From 5fb38e71cc5ab8eee8e7f489c4476d59104f07df Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 14 Jul 2021 16:59:40 +0800
Subject: [PATCH] 1.接口调整

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 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 72aa7d8..d1b1420 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -92,7 +92,10 @@
         FROM
             blade_dept dept
         WHERE
-            dept.parent_id = #{param2} AND dept.is_deleted = 0
+        dept.is_deleted = 0
+        <if test="param2!=null and param2!=0">
+            and dept.parent_id = #{param2}
+        </if>
         <if test="param1!=null and param1!=''">
             and dept.tenant_id = #{param1}
         </if>
@@ -142,15 +145,21 @@
 
     <select id="selectIn" resultType="java.util.HashMap">
         SELECT
-            id,
-            dept_name
+            id as deptid,
+            dept_name as deptname
         FROM
-            blade_dept
+            blade_dept where is_deleted = 0
     </select>
 
     <!--统计单位类型数量-->
     <select id="selectCount" resultType="java.util.HashMap">
-        SELECT dept.id as jurisdiction,dept.dept_name AS title FROM blade_dept dept WHERE  dept.dept_name  like concat(concat('%', #{name}),'%')
+        SELECT
+            id as jurisdiction,
+            dept_name AS title
+        FROM
+            sys_jurisdiction
+        WHERE
+            is_deleted = 0 AND  parent_id!=0
     </select>
 
     <select id="selectHold" resultType="java.util.HashMap">

--
Gitblit v1.9.3