From 722fa40345f1fc650eaeae4a721c3ae4106d92a8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 18 九月 2024 19:03:56 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
index 92b8d2f..ab2a740 100644
--- a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
@@ -10,6 +10,7 @@
<result property="deptId" column="dept_id"/>
<result property="delFlag" column="del_flag"/>
<result property="deptCode" column="dept_code"/>
+ <result property="deptName" column="dept_name"/>
<result property="deptType" column="dept_type"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
@@ -33,6 +34,7 @@
create_time,
update_time,
dept_code,
+ dept_name,
dept_type
from sys_user_dept
</sql>
@@ -55,6 +57,8 @@
</if>
<if test="updateTime != null ">
and update_time = #{updateTime}
+ </if> <if test="deptType != null ">
+ and dept_type = #{deptType}
</if>
</where>
</select>
@@ -88,6 +92,9 @@
<if test="deptCode != null ">
dept_code,
</if>
+ <if test="deptName != null ">
+ dept_name,
+ </if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},
@@ -108,6 +115,9 @@
</if>
<if test="deptCode != null ">
#{deptCode},
+ </if>
+ <if test="deptName != null ">
+ #{deptName},
</if>
</trim>
</insert>
@@ -136,6 +146,9 @@
<if test="deptCode != null ">
dept_code = #{deptCode},
</if>
+ <if test="deptName != null ">
+ dept_name = #{deptName},
+ </if>
</trim>
where id = #{id}
</update>
@@ -149,7 +162,14 @@
</update>
<select id="selectDeptListByUserId" resultMap="deptResult">
- select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status
+ select d.dept_id,
+ d.dept_name,
+ d.parent_id,
+ d.ancestors,
+ d.dept_name,
+ d.order_num,
+ d.leader,
+ d.status as dept_status
from sys_dept d
left join sys_user_dept ud on d.dept_id = ud.dept_id
where ud.user_id = #{userId}
--
Gitblit v1.9.3