From 97ebe4578f2876b73017fa5690f245b762cfe2ae Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 01 Dec 2021 17:17:38 +0800
Subject: [PATCH] 部门树接口修改

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   60 +++++++++++++++++++++++++++++-------------------------------
 1 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index 646a324..c73d68c 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -142,7 +142,7 @@
     <!--懒加载获取部门树形结构(包含用户数据)-->
     <select id="lazyTreeUser" resultMap="treeNodeResultMap">
         select DISTINCT  * from (
-            (SELECT
+                    (SELECT
               dept.id,
               dept.parent_id,
               dept.dept_name AS title,
@@ -166,36 +166,34 @@
                         dept.is_deleted = 0
 						and si.stats = 2
                         and si.departmentid !=1432626178757275649
-                    <if test="parentId!=null and parentId!=0">
-                        and si.departmentid = 1111
-                    </if>
+                        and si.departmentid !=1445980335107002370
+                        and si.departmentid !=1442115701350387714
             )
-            <if test="parentId!=null and parentId!=0">
-                union
-                (select
-                    bu.id,
-                    bu.dept_id  parent_id,
-                    real_name AS title,
-                    bu.id AS "value",
-                    bu.id AS "key",
-                    0 as "has_children"
-                    from blade_user bu
-                                    left join
-                                    blade_dept bd
-                                    on
-                                    bd.id = bu.dept_id
-                                    left join
-                                    sys_information si
-                                    on
-                                    si.departmentid = bd.id
-                                    where bd.is_deleted = 0
-                                    and bu.is_deleted = 0
-                                    and bu.`status` =1
-                                    and si.stats = 2
-                                    and si.departmentid = #{parentId}
-                                    and si.departmentid !=1432626178757275649
-                )
-            </if>
+            union
+            (select
+                bu.id,
+                bu.dept_id  parent_id,
+                real_name AS title,
+                bu.id AS "value",
+                bu.id AS "key",
+                0 as "has_children"
+                from blade_user bu
+                                left join
+                                blade_dept bd
+                                on
+                                bd.id = bu.dept_id
+                                left join
+                                sys_information si
+                                on
+                                si.departmentid = bd.id
+                                where bd.is_deleted = 0
+                                and bu.is_deleted = 0
+                                and bu.`status` =1
+                                and si.stats = 2
+                                and si.departmentid !=1432626178757275649
+                                and si.departmentid !=1445980335107002370
+                                and si.departmentid !=1442115701350387714
+            )
         )c
     </select>
 
@@ -260,7 +258,7 @@
     <!--懒加载获取部门树形结构(包含用户数据)-->
     <select id="lazyTreeUsers" resultType="org.springblade.modules.system.node.TreeNodes" >
         select DISTINCT
-        *
+            *
         from (
         (SELECT
         dept.id,

--
Gitblit v1.9.3