From c4ec501d4280f34c1abcf18015b1b9605626677a Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 22 四月 2025 21:43:27 +0800
Subject: [PATCH] 家族导出bug

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfClanController.java |   19 +++++++++++++------
 zhang-content/src/main/java/com/ruoyi/service/ZfClanService.java               |    3 +++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfClanServiceImpl.java      |   10 ++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfClanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfClanController.java
index 115853c..3aae32c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfClanController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfClanController.java
@@ -10,10 +10,7 @@
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.domain.Meeting;
-import com.ruoyi.domain.ZInfoUser;
-import com.ruoyi.domain.ZfClan;
-import com.ruoyi.domain.ZfClean;
+import com.ruoyi.domain.*;
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfClanService;
 import com.ruoyi.system.mapper.SysUserRoleMapper;
@@ -106,12 +103,22 @@
      */
     @Log(title = "瀹舵棌璁板綍", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, @RequestBody ZfClan zfClean)
+    public void export(HttpServletResponse response, ZfClan zfClean)
     {
         List<ZfClan> list = zfClanService.selectByCondition(zfClean);
    //     log.info("瀵煎嚭璁板綍涓�:{}",list);
         ExcelUtil<ZfClan> util = new ExcelUtil<>(ZfClan.class);
         util.exportExcel(response, list, "瀹舵棌鍙�");
     }
-
+    /**
+     * 瀵煎嚭瀹跺涵璧勪骇璁板綍鍒楄〃
+     */
+    @Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT)
+    @PostMapping("/export1/{ids}")
+    public void export1(HttpServletResponse response, @PathVariable Long[] ids) {
+        for (Long id :ids) System.out.println("//////"+id);
+        List<ZfClan> list = zfClanService.selectByIds(ids);
+        ExcelUtil<ZfClan> util = new ExcelUtil<ZfClan>(ZfClan.class);
+        util.exportExcel(response, list, "瀹跺涵璧勪骇璁板綍鏁版嵁");
+    }
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfClanService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfClanService.java
index 1adb3cb..f645af4 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfClanService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfClanService.java
@@ -6,6 +6,7 @@
 import com.ruoyi.domain.Meeting;
 import com.ruoyi.domain.ZfClan;
 import com.ruoyi.domain.ZfClean;
+import com.ruoyi.domain.ZfProperty;
 
 import java.util.List;
 
@@ -23,4 +24,6 @@
 
     List<ZfClan> selectByCondition(ZfClan zfClan);
 
+    List<ZfClan> selectByIds(Long[] ids);
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfClanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfClanServiceImpl.java
index 0296820..1efa98a 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfClanServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfClanServiceImpl.java
@@ -114,6 +114,16 @@
     }
 
     @Override
+    public List<ZfClan> selectByIds(Long[] ids) {
+        List<ZfClan> list = new ArrayList<>();
+        if(ids.length!=0)
+            list = listByIds(Arrays.asList(ids));
+        else
+            list = list();
+        return list;
+    }
+
+    @Override
     public AjaxResult addData(ZfClan zfClan) {
         LambdaQueryWrapper<ZfClan> lqw = uniqueCondition(zfClan);
         List<ZfClan> list = list(lqw);

--
Gitblit v1.9.1