From 2baa05224b72fbae849678e338bbc85506a9cfe6 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 29 九月 2025 18:31:55 +0800 Subject: [PATCH] 新增Orgid --- smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml index 3cc633b..dbdef40 100644 --- a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml @@ -46,6 +46,7 @@ <include refid="selectSysUserDeptVo"/> <where> del_flag=0 + and orgid=#{orgid} <if test="userId != null "> and user_id = #{userId} </if> @@ -101,8 +102,12 @@ </if> <if test="deptName != null "> dept_name, - </if> <if test="orgid != null "> - orgid, + </if> + <if test="orgid != null "> + orgid, + </if> + <if test="userCode != null "> + user_code, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> @@ -127,8 +132,12 @@ </if> <if test="deptName != null "> #{deptName}, - </if><if test="orgid != null "> + </if> + <if test="orgid != null "> #{orgid}, + </if> + <if test="userCode != null "> + #{userCode}, </if> </trim> </insert> @@ -159,8 +168,9 @@ </if> <if test="deptName != null "> dept_name = #{deptName}, - </if> <if test="orgid != null "> - orgid = #{orgid}, + </if> + <if test="orgid != null "> + orgid = #{orgid}, </if> </trim> where id = #{id} @@ -185,7 +195,7 @@ d.orgid, d.status as dept_status from sys_dept d - left join sys_user_dept ud on d.dept_id = ud.dept_id + left join sys_user_dept ud on d.dept_code = ud.dept_code where ud.user_id = #{userId} and ud.del_flag = 0 and d.del_flag = 0 -- Gitblit v1.9.3