From a5c7efc90dd29fa261d7ae7eb73240ce1d88b3ce Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 06 十一月 2025 11:06:58 +0800
Subject: [PATCH] 代码提交

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

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 5be683e..3c24a94 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -36,6 +36,7 @@
         <result property="searchscope" column="searchscope"/>
         <result property="guid" column="guid"/>
         <result property="orgid" column="orgid"/>
+        <result property="campusid" column="campusid"/>
         <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept"
                      resultMap="deptResult"/>
         <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
@@ -49,6 +50,7 @@
         <result property="orderNum" column="order_num"/>
         <result property="leader" column="leader"/>
         <result property="status" column="dept_status"/>
+        <result property="campusid" column="campusid"/>
     </resultMap>
 
     <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole">
@@ -65,6 +67,7 @@
                u.dept_id,
                u.id_card,
                u.hosp_info,
+               u.campusid,
                u.dept_info,
                u.searchscope,
                u.user_name,
@@ -114,6 +117,7 @@
         u.nick_name, u.user_name,
         u.email,u.id_card,
         u.avatar,
+        u.campusid,
         u.dept_name,
         u.dept_code,
         u.birthday,
@@ -128,6 +132,76 @@
         </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}, '%')
+        </if>
+        <if test="nickName != null and nickName != ''">
+            AND u.nick_name like concat('%', #{nickName}, '%')
+        </if>
+        <if test="status != null and status != ''">
+            AND u.status = #{status}
+        </if>
+        <if test="campusid != null and campusid != ''">
+            AND u.campusid = #{campusid}
+        </if>
+        <if test="idCard != null and idCard != ''">
+            AND u.id_card = #{idCard}
+        </if>
+        <if test="title != null and title != ''">
+            AND u.title = #{title}
+        </if>
+        <if test="jobPhone != null and jobPhone != ''">
+            AND u.job_phone = #{jobPhone}
+        </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}
+        </if>
+        <if test="phonenumber != null and phonenumber != ''">
+            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        </if>
+        <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+            AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+        </if>
+        <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+            AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+        </if>
+        <if test="deptId != null and deptId != 0">
+            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
+            ancestors) ))
+        </if>
+        <!-- 鏁版嵁鑼冨洿杩囨护 -->
+        ${params.dataScope}
+    </select>
+    <select id="getUserList" 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,
+        u.nick_name, u.user_name,u.campusid,
+        u.email,u.id_card,
+        u.avatar,
+        u.dept_name,
+        u.dept_code,
+        u.birthday,
+        u.job_phone,
+        u.phonenumber, u.sex, u.status,
+        u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
+        where u.del_flag = '0'
+        <if test="userId != null">
+            AND u.user_id = #{userId}
+        </if>
+        <if test="orgid != null and orgid != ''">
+            AND u.orgid = #{orgid}
+        </if>
+        <if test="campusid != null and campusid != ''">
+            AND u.campusid = #{campusid}
         </if>
         <if test="userName != null and userName != ''">
             AND u.user_name like concat('%', #{userName}, '%')
@@ -172,8 +246,7 @@
             AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
             ancestors) ))
         </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        ${params.dataScope}
+        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
     </select>
 
     <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser"
@@ -184,6 +257,7 @@
         u.email,
         u.dept_code,
         u.dept_name,
+        u.campusid,
         u.birthday,
         u.job_phone,
         u.phonenumber, u.status,u.id_card,
@@ -213,6 +287,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.campusid,
         u.email,
         u.his_user_id,
         u.title,
@@ -314,6 +389,7 @@
         <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="campusid != null and campusid != ''">campusid,</if>
         create_time
         )values(
         <if test="userId != null and userId != ''">#{userId},</if>
@@ -340,6 +416,7 @@
         <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="campusid != null and campusid != ''">#{campusid},</if>
         sysdate()
         )
     </insert>
@@ -376,6 +453,7 @@
             </if>
             <if test="deptCode != null and deptCode != ''">dept_code=#{deptCode},</if>
             <if test="deptName != null and deptName != ''">dept_name=#{deptName},</if>
+            <if test="campusid != null and campusid != ''">campusid=#{campusid},</if>
             update_time = sysdate()
         </set>
         where user_id = #{userId}

--
Gitblit v1.9.3