From 6acee0d1d79a05f7a3a3c386e9df02e9a741f544 Mon Sep 17 00:00:00 2001
From: ZQN <364596817@qq.com>
Date: 星期五, 21 六月 2024 17:21:16 +0800
Subject: [PATCH] 执法单节点添加,审批修改

---
 project-system/src/main/resources/mapper/system/SysUserMapper.xml |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/project-system/src/main/resources/mapper/system/SysUserMapper.xml b/project-system/src/main/resources/mapper/system/SysUserMapper.xml
index 7280b60..0e54a13 100644
--- a/project-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/project-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -92,7 +92,9 @@
 			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
-		${params.dataScope}
+		<if test="params != null and params.dataScope != null">
+			AND ${params.dataScope}
+		</if>
 	</select>
 
 	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
@@ -109,7 +111,9 @@
 			AND u.phonenumber like concat('%', #{phonenumber}, '%')
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
-		${params.dataScope}
+		<if test="params != null and params.dataScope != null">
+			AND ${params.dataScope}
+		</if>
 	</select>
 
 	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
@@ -127,7 +131,9 @@
 			AND u.phonenumber like concat('%', #{phonenumber}, '%')
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
-		${params.dataScope}
+		<if test="params != null and params.dataScope != null">
+			AND ${params.dataScope}
+		</if>
 	</select>
 
 	<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
@@ -241,9 +247,9 @@
 			join sys_user_role ur on u.user_id = ur.user_id
 			join sys_role r on r.role_id=ur.role_id
 		where
-		  u.user_type = '01'
+		  u.user_type != '02'
 		  and r.role_key = #{roleKey}
-		  and (u.dept_id = #{deptId} or u.dept_id in (SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors)))
+		  and u.dept_id = #{deptId}
 	</select>
 
 </mapper>

--
Gitblit v1.9.1