From 5ecb954f03f2da90df620155cc98edf3b8184b3d Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期四, 26 十月 2023 15:07:33 +0800
Subject: [PATCH] 修改bug

---
 cloud-server-management/src/main/resources/mapper/DeptMapper.xml |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/cloud-server-management/src/main/resources/mapper/DeptMapper.xml b/cloud-server-management/src/main/resources/mapper/DeptMapper.xml
index c839682..88bdbec 100644
--- a/cloud-server-management/src/main/resources/mapper/DeptMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/DeptMapper.xml
@@ -23,13 +23,19 @@
 		ELSE
 		'false'
 		END
-		) as isOpen from sys_dept
+		) as isOpen from sys_dept where 1=1
+		<if test="type ==3 ">
+            and objectType =3 and objectId =#{id}
+        </if>
 	</select>
 
     <select id="list" resultType="map">
-        select * from sys_dept
+        select * from sys_dept where 1=1
         <if test="condition != null and condition != ''">
-            where simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%')
+            and  simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%')
+        </if>
+        <if test="objectType == 3">
+            and  objectType = 3 and objectId =#{objectId}
         </if>
         order by num ASC
     </select>

--
Gitblit v1.7.1