From ae8dfb86654fd98592e57bbfe820b7c2275ce8a5 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 25 九月 2025 19:00:47 +0800 Subject: [PATCH] usrer_name不进行模糊查询 --- smartor/src/main/resources/mapper/smartor/SysUserMapper.xml | 69 ++++++++++++++++++++++++++++------ 1 files changed, 57 insertions(+), 12 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml index 861e149..2e6237e 100644 --- a/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml @@ -9,6 +9,7 @@ <id property="orgid" column="orgid"/> <id property="hisUserId" column="his_user_id"/> <result property="deptId" column="dept_id"/> + <result property="userCode" column="user_code"/> <result property="hospInfo" column="hosp_info"/> <result property="deptInfo" column="dept_info"/> <result property="userName" column="user_name"/> @@ -61,6 +62,7 @@ <sql id="selectUserVo"> select u.user_id, u.dept_id, + u.user_code, u.id_card, u.hosp_info, u.dept_info, @@ -106,7 +108,8 @@ </sql> <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> - select u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_type, + select u.user_code,u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, + u.user_type, u.nick_name, u.user_name, u.email,u.id_card, u.avatar, @@ -122,7 +125,7 @@ AND u.user_id = #{userId} </if> <if test="userName != null and userName != ''"> - AND u.user_name like concat('%', #{userName}, '%') + AND u.user_name = #{userName} </if> <if test="nickName != null and nickName != ''"> AND u.nick_name like concat('%', #{nickName}, '%') @@ -136,8 +139,8 @@ <if test="title != null and title != ''"> AND u.title = #{title} </if> - <if test="job_phone != null and job_phone != ''"> - AND u.job_phone = #{job_phone} + <if test="jobPhone != null and jobPhone != ''"> + AND u.job_phone = #{jobPhone} </if> <if test="birthday != null and birthday != ''"> AND u.birthday = #{birthday} @@ -165,7 +168,7 @@ <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> select distinct u.user_id,u.his_user_id,u.title,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_name, - u.user_type, + u.user_type,u.user_code, u.nick_name, u.email, u.birthday, @@ -198,6 +201,7 @@ resultMap="SysUserResult"> select distinct u.user_id, u.dept_id, u.hosp_info, u.dept_info,u.searchscope, u.user_name, u.user_type, u.nick_name, + u.user_code, u.email, u.his_user_id, u.title, @@ -280,6 +284,9 @@ <if test="hisUserId != null and hisUserId != ''">his_user_id,</if> <if test="guid != null and guid != ''">guid,</if> <if test="orgid != null and orgid != ''">orgid,</if> + <if test="deptCode != null and deptCode != ''">dept_code,</if> + <if test="deptName != null and deptName != ''">dept_name,</if> + <if test="userCode != null and userCode != ''">user_code,</if> create_time )values( <if test="userId != null and userId != ''">#{userId},</if> @@ -305,8 +312,50 @@ <if test="hisUserId != null and hisUserId != ''">#{hisUserId},</if> <if test="guid != null and guid != ''">#{guid},</if> <if test="orgid != null and orgid != ''">#{orgid},</if> + <if test="deptCode != null and deptCode != ''">#{deptCode},</if> + <if test="deptName != null and deptName != ''">#{deptName},</if> + <if test="userCode != null and userCode != ''">#{userCode},</if> sysdate() ) + </insert> + + + <insert id="batchUser" useGeneratedKeys="true" keyProperty="userId"> + insert into sys_user( + user_id, dept_id, user_name, nick_name, email, avatar, phonenumber, sex, password, status, create_by, remark, + user_type, dept_info, hosp_info, searchscope, id_card, title, job_phone, birthday, his_user_id, guid, + orgid,user_code, + create_time + ) values + <foreach collection="list" item="item" separator=","> + ( + #{item.userId}, + #{item.deptId}, + #{item.userName}, + #{item.nickName}, + #{item.email}, + #{item.avatar}, + #{item.phonenumber}, + #{item.sex}, + #{item.password}, + #{item.status}, + #{item.createBy}, + #{item.remark}, + #{item.userType}, + #{item.deptInfo}, + #{item.hospInfo}, + #{item.searchscope}, + #{item.idCard}, + #{item.title}, + #{item.jobPhone}, + #{item.birthday}, + #{item.hisUserId}, + #{item.guid}, + #{item.orgid}, + #{item.userCode}, + now() + ) + </foreach> </insert> <update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> @@ -333,6 +382,7 @@ <if test="jobPhone != null and jobPhone != ''">job_phone=#{jobPhone},</if> <if test="birthday != null ">birthday=#{birthday},</if> <if test="orgid != null ">orgid=#{orgid},</if> + <if test="userCode != null ">user_code=#{userCode},</if> <if test="title != null and title != ''"> title = #{title}, </if> @@ -344,11 +394,6 @@ where user_id = #{userId} </update> - <update id="updateUserStatus" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> - update sys_user - set status = #{status} - where user_id = #{userId} - </update> <update id="updateUserAvatar" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> update sys_user @@ -364,12 +409,12 @@ <delete id="deleteUserById" parameterType="Long"> update sys_user - set del_flag = '2' + set del_flag = '1' where user_id = #{userId} </delete> <delete id="deleteUserByIds" parameterType="Long"> - update sys_user set del_flag = '2' where user_id in + update sys_user set del_flag = '1' where user_id in <foreach collection="array" item="userId" open="(" separator="," close=")"> #{userId} </foreach> -- Gitblit v1.9.3