From 57eac5a31c6823962b8e77ec8a9604e41882fb32 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 21 十月 2026 13:52:00 +0800
Subject: [PATCH] 【市一】随访微信超链接修改

---
 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 1601714..ac40ec5 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -196,6 +196,9 @@
         <if test="userId != null">
             AND u.user_id = #{userId}
         </if>
+        <if test="userCode != null">
+            AND u.user_code = #{userCode}
+        </if>
         <if test="userName != null and userName != ''">
             AND u.user_name like concat('%', #{userName}, '%')
         </if>
@@ -242,6 +245,26 @@
         <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
     </select>
 
+    <select id="selectUsersForRepairUserDept" resultMap="SysUserResult">
+        select u.user_id,
+               u.user_name,
+               u.orgid,
+               u.campusid,
+               u.hosp_info,
+               u.dept_info
+        from sys_user u
+        where u.del_flag = '0'
+          and ((u.hosp_info is not null and u.hosp_info != '' and u.hosp_info != '[]')
+            or (u.dept_info is not null and u.dept_info != '' and u.dept_info != '[]'))
+        <if test="orgid != null and orgid != ''">
+            AND u.orgid = #{orgid}
+        </if>
+        <if test="userId != null">
+            AND u.user_id = #{userId}
+        </if>
+        order by u.user_id
+    </select>
+
     <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,

--
Gitblit v1.9.3