From cb966ac5c02835eab5a99b7b93a5a9a063cf3201 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 25 六月 2025 15:55:08 +0800
Subject: [PATCH] 人员优化
---
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index d44c977..8cbe2d3 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -141,8 +141,25 @@
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select>
-
- <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
+ <select id="selectUserListAll" resultType="com.ruoyi.common.core.domain.entity.SysUser">
+ select user_id, nick_name from sys_user where del_flag = '0'
+ </select>
+ <select id="selectList" resultType="com.ruoyi.common.core.domain.entity.SysUser">
+ SELECT user_id, nick_name FROM sys_user
+ <where>
+ <if test="list != null and list.size() > 0">
+ user_id IN
+ <foreach item="id" collection="list" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </if>
+ <if test="list == null or list.size() == 0">
+ 1=0 <!-- 绌哄垪琛ㄦ椂杩斿洖绌虹粨鏋� -->
+ </if>
+ </where>
+ </select>
+
+ <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
<if test="deptId != null and deptId != 0">dept_id,</if>
--
Gitblit v1.9.3