From 4c19ddd36bdfb43b5ef4e8df3c9a98cd4d356d6c Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 26 May 2022 10:55:04 +0800
Subject: [PATCH] 1、资讯模糊匹配修改

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 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 1a13009..11887f3 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -99,6 +99,43 @@
         ORDER BY dept.sort
     </select>
 
+
+    <select id="lazyTreeSecurity" resultMap="treeNodeResultMap" >
+        select DISTINCT  * from (
+            (SELECT
+              dept.id,
+              dept.parent_id,
+              dept.dept_name AS title,
+              dept.id AS "value",
+              dept.id AS "key",
+                        (
+                            SELECT
+                                CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+                            FROM
+                                blade_dept
+                            WHERE
+                                parent_id = dept.id and is_deleted = 0
+                        ) AS "has_children"
+                    FROM
+                        blade_dept dept
+                    WHERE
+                        dept.is_deleted = 0
+            )
+
+            union
+
+            (select
+                id,
+                dept_id  parent_id,
+                real_name AS title,
+                id AS "value",
+                id AS "key",
+                0 as "has_children"
+                from blade_user
+            )
+        )c
+    </select>
+
     <select id="getDeptNames" resultType="java.lang.String">
         SELECT
         dept_name
@@ -117,6 +154,10 @@
         select id ,dept_name deptName from blade_dept where is_deleted=0
     </select>
 
+    <select id="selXQList" resultType="org.springblade.common.vo.DeptVo">
+        select id ,dept_name deptName from sys_jurisdiction where is_deleted=0
+    </select>
+
 
     <select id="selectInfo" resultType="java.util.HashMap">
         SELECT

--
Gitblit v1.9.3