From 48e6a7175d35994d54d2dd86d7ee12f3f0cc50f3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 16 九月 2022 10:42:44 +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..c4f4143 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());
+        // 娣辨嫹璐�
+        List<Map<String, Object>> result = ListUtils.deepCopy(tree);
         if (!Cools.isEmpty(condition)) {
             treeUtils.remove(condition, result);
             treeUtils.remove(condition, result);

--
Gitblit v1.9.1