From 5d2d6fdff67f8f9a7e65abdbb4b87dba07dcb32b Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 02 九月 2025 10:23:02 +0800 Subject: [PATCH] 上传修改 --- ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index c76e470..4dfb977 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -294,6 +294,12 @@ AND u.nick_name LIKE concat('%',#{nickName},'%') </if> </select> + <select id="selectOldList" resultType="com.ruoyi.common.core.domain.entity.SysUser"> + select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, + u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, + u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark + from sys_user u where user_id < 0 and u.status = 0 and u.del_flag = 0 order by user_id desc + </select> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> insert into sys_user( @@ -313,6 +319,7 @@ <if test="ifBlack != null">ifBlack,</if> <if test="districtId != null">districtId,</if> <if test="roleType != null">role_type,</if> + <if test="userIdentification != null and userIdentification != ''">userIdentification,</if> create_time )values( <if test="userId != null and userId != ''">#{userId},</if> @@ -331,6 +338,7 @@ <if test="ifBlack != null">#{ifBlack},</if> <if test="districtId != null">#{districtId},</if> <if test="roleType != null">#{roleType},</if> + <if test="userIdentification != null and userIdentification != ''">#{userIdentification},</if> sysdate() ) </insert> @@ -387,6 +395,16 @@ <update id="editSignPicture" parameterType="SysUser"> update sys_user set sign_picture = #{signPicture} where user_id = #{userId} </update> + <update id="updateUserInherit"> + update sys_user + <set> + <if test="parentId != null">parentId = #{parentId},</if> + <if test="parentAccount != null and parentAccount != ''">parentAccount = #{parentAccount},</if> + <if test="userId != null">user_id = #{userId},</if> + update_time = sysdate() + </set> + where userIdentification = #{userIdentification} + </update> <delete id="deleteUserById" parameterType="Long"> update sys_user set del_flag = '2' where user_id = #{userId} @@ -398,5 +416,8 @@ #{userId} </foreach> </delete> - + <delete id="deleteUserByOldUserId"> + delete from sys_user where user_id = #{oldUserId} + </delete> + </mapper> \ No newline at end of file -- Gitblit v1.7.1