From 26f417382ff5cea9635d0ca65852e83938228e8a Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期六, 18 七月 2026 14:28:17 +0800
Subject: [PATCH] 【景宁】用户-关系删除原有关系
---
ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml
index 3ebd0e5..4795ebc 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml
@@ -71,7 +71,7 @@
<if test="deptCode != null ">
and dept_code = #{deptCode}
</if>
- <if test="campusid != null ">
+ <if test="campusid != null and campusid != ''">
and campusid = #{campusid}
</if>
</select>
@@ -237,6 +237,24 @@
where user_id =#{userId} and dept_code=#{deptCode}
</update>
+ <update id="deleteSysUserDeptByUserId" parameterType="String">
+ update sys_user_dept
+ <trim prefix="SET" suffixOverrides=",">
+ del_flag =1,
+ update_time = sysdate()
+ </trim>
+ where del_flag = 0
+ <if test="userId != null">
+ and user_id =#{userId}
+ </if>
+ <if test="orgid != null ">
+ and orgid = #{orgid}
+ </if>
+ <if test="deptType != null ">
+ and dept_type = #{deptType}
+ </if>
+ </update>
+
<update id="updateSysUserDeptForSync" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept">
update sys_user_dept
<trim prefix="SET" suffixOverrides=",">
--
Gitblit v1.9.3