From d53d5f2a27966324a6bfaf7e8caf520f882c882d Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期五, 23 九月 2022 09:10:41 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/crm/system/controller/DeptController.java |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/crm/system/controller/DeptController.java b/src/main/java/com/zy/crm/system/controller/DeptController.java
index b753f51..cb904f3 100644
--- a/src/main/java/com/zy/crm/system/controller/DeptController.java
+++ b/src/main/java/com/zy/crm/system/controller/DeptController.java
@@ -172,9 +172,22 @@
     @PostMapping(value = "/dept/tree/auth")
     @ManagerAuth
     public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException {
-        ArrayList<Map> tree = treeUtils.getDeptTree(String.valueOf(getDeptId()), getHostId());
+        ArrayList<Map<String, Object>> tree = treeUtils.getDeptTree(String.valueOf(getDeptId()), getHostId());
         // 娣辨嫹璐�
-        List<Map> result = ListUtils.deepCopy(tree);
+        List<Map<String, Object>> result = ListUtils.deepCopy(tree);
+        if (!Cools.isEmpty(condition)) {
+            treeUtils.remove(condition, result);
+            treeUtils.remove(condition, result);
+        }
+        return R.ok(result);
+    }
+
+    @PostMapping(value = "/dept/user/tree/auth")
+    @ManagerAuth
+    public R deptUserTree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException {
+        ArrayList<Map<String, Object>> tree = treeUtils.getDeptUserTree(String.valueOf(getDeptId()), getHostId(), getUserId());
+        // 娣辨嫹璐�
+        List<Map<String, Object>> result = ListUtils.deepCopy(tree);
         if (!Cools.isEmpty(condition)) {
             treeUtils.remove(condition, result);
             treeUtils.remove(condition, result);

--
Gitblit v1.9.1