From 28cf0afe5cb951bf34a60a1ee0f36d38c592a8c0 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 09 十二月 2025 11:10:29 +0800
Subject: [PATCH] 新增搜索 不选模块进行全局搜索 获取每个模块

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
index 3198f1a..31efa74 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
@@ -6,6 +6,8 @@
 import com.ruoyi.service.ZfEconomyService;
 import com.ruoyi.service.impl.InterfaceBasedSearchRouter;
 import com.ruoyi.service.impl.ZfEconomyServiceImpl;
+import com.ruoyi.system.service.ISysMenuService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
@@ -63,9 +65,25 @@
 
         System.out.println("[[[[[["+happenStartTime);
         System.out.println("[[[[[["+happenEndTime);
-
+        zfEconomyService.clearAllCache();
     return interfaceBasedSearchRouter.routeSearch(moduleCode,companion,happenStartTime,happenEndTime);
     }
+    /**
+     * 鏂板鍏ㄦā鍧楁悳绱㈡帴鍙o紙涓嶆寚瀹歮oduleCode锛�
+     */
+    @GetMapping("/companion")
+    public AjaxResult getAllModulesByCompanion(@RequestParam(value = "companion", required = false) String companion,
+                                               @RequestParam(value = "happenStartTime", required = false)
+                                               @DateTimeFormat(pattern = "yyyy-MM-dd") Date happenStartTime,
+                                               @RequestParam(value = "happenEndTime", required = false)
+                                               @DateTimeFormat(pattern = "yyyy-MM-dd") Date happenEndTime) {
 
+        System.out.println("鍏ㄦā鍧楁悳绱� - 鍚屼即: " + companion);
+        System.out.println("鍏ㄦā鍧楁悳绱� - 寮�濮嬫椂闂�: " + happenStartTime);
+        System.out.println("鍏ㄦā鍧楁悳绱� - 缁撴潫鏃堕棿: " + happenEndTime);
+        zfEconomyService.clearAllCache();
+        // 浣跨敤null鎴栫┖瀛楃涓茶〃绀哄叏妯″潡鎼滅储
+        return interfaceBasedSearchRouter.routeSearch(null, companion, happenStartTime, happenEndTime);
+    }
 
 }

--
Gitblit v1.9.1