feige
2024-06-16 3ad8fb4e7cc1391e8090f3da6ffa9c48690a12a3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java
@@ -16,6 +16,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -52,7 +53,7 @@
     * 根据id查询
     */
    @GetMapping()
    public AjaxResult listById(Long id){
    public AjaxResult listById(@PathParam("id") Long id){
        return AjaxResult.success(zSelfNoteService.getById(id));
    }
@@ -72,8 +73,18 @@
     */
//    @PreAuthorize("@ss.hasPermi('system:property:export')")
    @Log(title = "个人记事本记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export/{ids}")
    public void export(HttpServletResponse response,@PathVariable Long[] ids)
    @PostMapping("/export")
    public void export(HttpServletResponse response)
    {
        List<ZSelfNote> list = zSelfNoteService.selectByCondition();
        log.info("导出记录为:{}",list);
        ExcelUtil<ZSelfNote> util = new ExcelUtil<>(ZSelfNote.class);
        util.exportExcel(response, list, "个人记事本记录数据");
    }
    @Log(title = "个人记事本记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export1/{ids}")
    public void export1(HttpServletResponse response,@PathVariable Long[] ids)
    {
        List<ZSelfNote> list = zSelfNoteService.selectByIds(ids);
        log.info("导出记录为:{}",list);