whywhyo
2023-08-01 627a31505ddd81c542a9a2c4b8ed114eee176a54
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java
@@ -49,9 +49,17 @@
    }
    /**
     * 根据id查询
     */
    @GetMapping()
    public AjaxResult listById(Long id){
        return AjaxResult.success(zSecretService.getById(id));
    }
    /**
     * 模板
     */
    @GetMapping("/model")
    @PostMapping("/model")
    public void getModel(HttpServletResponse response){
        ZSecret zSecret = new ZSecret();
        List<ZSecret> emptyList = Collections.singletonList(zSecret);
@@ -59,13 +67,23 @@
        util.exportExcel(response, emptyList, "藏心密语记录数据");
    }
    @Log(title = "藏心密语记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response)
    {
        List<ZSecret> list = zSecretService.selectByCondition();
        log.info("导出记录为:{}",list);
        ExcelUtil<ZSecret> util = new ExcelUtil<>(ZSecret.class);
        util.exportExcel(response, list, "藏心密语记录数据");
    }
    /**
     * 导出藏心密语记录列表
     */
//    @PreAuthorize("@ss.hasPermi('system:property:export')")
    @Log(title = "藏心密语记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export/{ids}")
    public void export(HttpServletResponse response,@PathVariable Long[] ids)
    @PostMapping("/export1/{ids}")
    public void export1(HttpServletResponse response,@PathVariable Long[] ids)
    {
        List<ZSecret> list = zSecretService.selectByIds(ids);
        log.info("导出记录为:{}",list);