From 371603a0eb9f3a279cf77073734e991b5851b792 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 05 九月 2025 16:21:01 +0800
Subject: [PATCH] 市一短信接口同步服务对接
---
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 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 18ad711..d975b62 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -25,6 +25,8 @@
<result property="idCard" column="id_card"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
+ <result property="deptCode" column="dept_code"/>
+ <result property="deptName" column="dept_name"/>
<result property="title" column="title"/>
<result property="birthday" column="birthday"/>
<result property="jobPhone" column="job_phone"/>
@@ -68,6 +70,8 @@
u.user_name,
u.user_type,
u.nick_name,
+ u.dept_code,
+ u.dept_name,
u.title,
u.his_user_id,
u.job_phone,
@@ -110,6 +114,8 @@
u.nick_name, u.user_name,
u.email,u.id_card,
u.avatar,
+ u.dept_name,
+ u.dept_code,
u.birthday,
u.job_phone,
u.phonenumber, u.sex, u.status,
@@ -117,8 +123,11 @@
u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
- <if test="userId != null and userId != 0">
+ <if test="userId != null">
AND u.user_id = #{userId}
+ </if>
+ <if test="orgid != null and orgid != ''">
+ AND u.orgid = #{orgid}
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
@@ -140,6 +149,12 @@
</if>
<if test="birthday != null and birthday != ''">
AND u.birthday = #{birthday}
+ </if>
+ <if test="deptName != null and deptName != ''">
+ AND u.dept_name = #{deptName}
+ </if>
+ <if test="deptCode != null and deptCode != ''">
+ AND u.dept_code = #{deptCode}
</if>
<if test="hisUserId != null and hisUserId != ''">
AND u.his_user_id = #{hisUserId}
@@ -167,6 +182,8 @@
u.user_type,
u.nick_name,
u.email,
+ u.dept_code,
+ u.dept_name,
u.birthday,
u.job_phone,
u.phonenumber, u.status,u.id_card,
@@ -199,6 +216,8 @@
u.email,
u.his_user_id,
u.title,
+ u.dept_code,
+ u.dept_name,
u.job_phone,
u.birthday,
u.phonenumber, u.status,u.id_card,
@@ -223,6 +242,22 @@
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.user_name = #{userName} and u.del_flag = '0'
+ </select>
+
+ <select id="selectUserByUserNameByCondition" parameterType="String" resultMap="SysUserResult">
+ <include refid="selectUserVo"/>
+ <where>
+ u.del_flag = '0'
+ <if test="userName != null and userName != ''">
+ AND u.user_name = #{userName}
+ </if>
+ <if test="orgid != null and orgid != ''">
+ AND u.orgid = #{orgid}
+ </if>
+ <if test="deptId != null and deptId != ''">
+ AND u.dept_id = #{deptId}
+ </if>
+ </where>
</select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
@@ -277,6 +312,8 @@
<if test="birthday != null ">birthday,</if>
<if test="hisUserId != null and hisUserId != ''">his_user_id,</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>
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
@@ -301,6 +338,8 @@
<if test="birthday != null and birthday != ''">#{birthday},</if>
<if test="hisUserId != null and hisUserId != ''">#{hisUserId},</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>
sysdate()
)
</insert>
@@ -335,6 +374,8 @@
<if test="hisUserId != null and hisUserId != ''">
his_user_id = #{hisUserId},
</if>
+ <if test="deptCode != null and deptCode != ''">dept_code=#{deptCode},</if>
+ <if test="deptName != null and deptName != ''">dept_name=#{deptName},</if>
update_time = sysdate()
</set>
where user_id = #{userId}
--
Gitblit v1.9.3