From 562a960261b75d70abd65aa10528f09aeece94e8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 24 九月 2024 09:49:23 +0800
Subject: [PATCH] 代码提交
---
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 5ef2b50..875215c 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -21,6 +21,7 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="deptCode" column="dept_code"/>
+ <result property="deptType" column="dept_type"/>
</resultMap>
<sql id="selectDeptVo">
@@ -32,6 +33,7 @@
d.order_num,
d.leader,
d.phone,
+ d.dept_type,
d.email,
d.status,
d.del_flag,
@@ -58,6 +60,9 @@
<if test="deptCode != null and deptCode != ''">
AND dept_code = #{deptCode}
</if>
+ <if test="deptType != null and deptType != ''">
+ AND dept_type = #{deptType}
+ </if>
<!-- 鏁版嵁鑼冨洿杩囨护 -->
${params.dataScope}
order by d.parent_id, d.order_num
@@ -79,6 +84,7 @@
select d.dept_id,
d.parent_id,
d.dept_code,
+ d.dept_type,
d.ancestors,
d.dept_name,
d.order_num,
@@ -89,6 +95,23 @@
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
where d.dept_id = #{deptId}
+ </select>
+
+ <select id="selectDeptByCode" parameterType="string" resultMap="SysDeptResult">
+ select d.dept_id,
+ d.parent_id,
+ d.dept_code,
+ d.dept_type,
+ d.ancestors,
+ d.dept_name,
+ d.order_num,
+ d.leader,
+ d.phone,
+ d.email,
+ d.status
+ from sys_dept d
+ where del_flag = 0
+ and d.dept_code = #{deptCode}
</select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
@@ -136,6 +159,7 @@
<if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if>
<if test="deptCode != null">dept_code,</if>
+ <if test="deptType != null">dept_type,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
@@ -149,6 +173,7 @@
<if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if>
<if test="deptCode != null">#{deptCode},</if>
+ <if test="deptType != null">#{deptType},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
@@ -166,6 +191,7 @@
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="deptCode != null">dept_code=#{deptCode},</if>
+ <if test="deptType != null">dept_type=#{deptType},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
--
Gitblit v1.9.3