From 0ce689b428cf9ceb58972db2bdd42a1a176f8f20 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 11 七月 2025 14:52:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into pim_yys
---
src/main/resources/mapper/system/SysUserMapper.xml | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/system/SysUserMapper.xml b/src/main/resources/mapper/system/SysUserMapper.xml
index cb0bdb3..8e9ec54 100644
--- a/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/src/main/resources/mapper/system/SysUserMapper.xml
@@ -64,7 +64,10 @@
LEFT JOIN sys_dept T2 ON T1.dept_id = T2.dept_id
GROUP BY T1.user_id
) T2 on T2.user_id = u.user_id
- where u.del_flag = '0' and u.tenant_id = #{tenantId}
+ where u.del_flag = '0'
+ <if test="tenantId != null and tenantId != 0">
+ and u.tenant_id = #{tenantId}
+ </if>
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
@@ -147,7 +150,13 @@
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select>
-
+ <select id="selectUserByIds" resultType="com.ruoyi.project.system.domain.SysUser">
+ <include refid="selectUserVo"/>
+ where u.user_id in <foreach collection="userIds" item="item" open="(" separator="," close=")">
+ #{item}
+ </foreach>
+ </select>
+
<insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
--
Gitblit v1.9.3