From 41704e538bd0402b8e8ca826404ba84f6de56fe5 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 11 六月 2024 17:35:39 +0800
Subject: [PATCH] 修改分享

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java
index aa5e2a4..949ba2c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java
+++ b/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);

--
Gitblit v1.9.1