From 680a9877fe64c40aced1f4e04ea34056fac204fc Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Thu, 19 Mar 2026 14:03:30 +0800
Subject: [PATCH] 支持多部门
---
gkhy-system/src/main/resources/mapper/system/SysDeptMapper.xml | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/gkhy-system/src/main/resources/mapper/system/SysDeptMapper.xml b/gkhy-system/src/main/resources/mapper/system/SysDeptMapper.xml
index b5d6515..05ec6eb 100644
--- a/gkhy-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/gkhy-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -87,6 +87,18 @@
from sys_dept d
where d.dept_id = #{deptId}
</select>
+
+
+ <select id="selectDeptByIds" parameterType="java.util.ArrayList" resultMap="SysDeptResult">
+ select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.safety,
+ (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
+ from sys_dept d
+ where d.dept_id in
+ <foreach collection="array" item="deptId" open="(" separator="," close=")">
+ #{deptId}
+ </foreach>
+ and d.del_flag = '0'
+ </select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
--
Gitblit v1.9.2