From 7c86454ff569dc54bbe7e34988750a1df762a2c3 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 12 Jul 2022 10:42:33 +0800
Subject: [PATCH] 内网密码修改
---
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml | 86 ++++++++++++++++++++++++++++++++-----------
1 files changed, 64 insertions(+), 22 deletions(-)
diff --git a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
index 76b395e..90cf53b 100644
--- a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
+++ b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
@@ -35,15 +35,15 @@
<select id="lazyList" resultMap="deptVOResultMap">
SELECT
- dept.* ,
- (
- SELECT
- CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
- FROM
+ dept.* ,
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
sys_jurisdiction
- WHERE
- parent_id = dept.id and is_deleted = 0
- ) AS "has_children"
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
FROM
sys_jurisdiction dept
WHERE dept.is_deleted = 0
@@ -68,21 +68,21 @@
</if>
</select>
- <select id="lazyTree" resultMap="treeNodeResultMap" >
+ <select id="lazyTree" resultMap="treeNodeResultMap">
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
+ 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
sys_jurisdiction
- WHERE
- parent_id = dept.id and is_deleted = 0
- ) AS "has_children"
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
FROM
sys_jurisdiction dept
WHERE dept.is_deleted = 0
@@ -94,7 +94,7 @@
</if>
</select>
- <select id="lazyTrees" resultMap="treeNodeResultMap" >
+ <!--<select id="lazyTrees" resultMap="treeNodeResultMap" >
SELECT
dept.id,
dept.parent_id,
@@ -112,5 +112,47 @@
FROM
sys_jurisdiction dept
WHERE dept.is_deleted = 0
+ </select>-->
+
+ <select id="lazyTrees" resultMap="treeNodeResultMap">
+ 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 0 ELSE 1 END
+ FROM sys_jurisdiction
+ WHERE parent_id = dept.id
+ and is_deleted = 0
+ ) AS "has_children"
+ FROM sys_jurisdiction dept
+ WHERE (
+ SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM sys_jurisdiction
+ WHERE parent_id = dept.id
+ and is_deleted = 0
+ ) = 1
+ </select>
+ <select id="lazyTreeJu" resultMap="treeNodeResultMap">
+ 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 sys_jurisdiction
+ WHERE parent_id = dept.id
+ AND is_deleted = 0
+ ) AS "has_children"
+ FROM sys_jurisdiction dept
+ WHERE dept.is_deleted = 0
</select>
</mapper>
--
Gitblit v1.9.3