From 6d76addcf2e459d7aea53c3858847e8047746a53 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 27 三月 2026 17:06:40 +0800
Subject: [PATCH] yys 1.修改bug
---
src/main/resources/mapper/system/SysUserDeptMapper.xml | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/system/SysUserDeptMapper.xml b/src/main/resources/mapper/system/SysUserDeptMapper.xml
index 81c1365..8097988 100644
--- a/src/main/resources/mapper/system/SysUserDeptMapper.xml
+++ b/src/main/resources/mapper/system/SysUserDeptMapper.xml
@@ -13,15 +13,18 @@
sys_user_dept T1
LEFT JOIN sys_dept T2 ON T1.dept_id = T2.dept_id
<where>
- T1.dept_id IN (select dept_id from sys_dept where parent_id = 100)
+ T1.dept_id IN (select dept_id from sys_dept where parent_id != 0)
<if test="userDeptVo.userId != null">
AND T1.user_id = #{userDeptVo.userId}
</if>
<if test="userDeptVo.userName != null and userDeptVo.userName != '' ">
AND T1.user_id IN (
- SELECT user_id FROM sys_user WHERE nick_name LIKE CONCAT('%',#{userDeptVo.userName},'%')
+ SELECT user_id FROM sys_user WHERE user_name LIKE CONCAT('%',#{userDeptVo.userName},'%')
)
</if>
</where>
</select>
+ <select id="selectUserIdByDeptId" resultType="java.lang.Long">
+ SELECT user_id FROM sys_user_dept WHERE dept_id = #{deptId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3