From c50e176c4a6b9331d2d1c0520bafb18f54f0dee6 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 08 三月 2024 17:35:10 +0800 Subject: [PATCH] 部门增加管理员 --- src/main/resources/mapper/UserMapper.xml | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index 2579dda..2afc008 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -23,7 +23,7 @@ </resultMap> <sql id="Base_Column_List"> id, user_uuid, user_name, password, real_name, age, sex, birth_day, user_level, phone, - role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id + role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id, dept_admin </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select @@ -220,6 +220,9 @@ <if test="wxOpenId != null"> wx_open_id = #{wxOpenId,jdbcType=VARCHAR}, </if> + <if test="deptAdmin != null"> + dept_admin = #{deptAdmin}, + </if> </set> where id = #{id,jdbcType=INTEGER} </update> @@ -241,7 +244,8 @@ modify_time = #{modifyTime,jdbcType=TIMESTAMP}, last_active_time = #{lastActiveTime,jdbcType=TIMESTAMP}, deleted = #{deleted,jdbcType=BIT}, - wx_open_id = #{wxOpenId,jdbcType=VARCHAR} + wx_open_id = #{wxOpenId,jdbcType=VARCHAR}, + dept_admin = #{deptAdmin} where id = #{id,jdbcType=INTEGER} </update> @@ -434,4 +438,10 @@ </if> </where> </select> + + + <update id="updateDeptAdmin"> + UPDATE t_user SET dept_admin = #{deptAdmin} WHERE id = #{id} AND deleted = 0 + </update> + </mapper> -- Gitblit v1.8.0