From 1cdb6459f1e05b23f15920fe90aad5e6e7f1d061 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 19 二月 2025 14:06:16 +0800 Subject: [PATCH] 部门新增修改接口调整 --- system/src/main/resources/mapper/system/SysDeptMapper.xml | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/system/src/main/resources/mapper/system/SysDeptMapper.xml b/system/src/main/resources/mapper/system/SysDeptMapper.xml index 049098e..b21db8d 100644 --- a/system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -65,6 +65,13 @@ where d.dept_id = #{deptId} </select> + <select id="selectDeptByIds" parameterType="Long" 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, + (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="deptIds" open="(" separator="," close=")" item="deptId">#{deptId}</foreach> + </select> + <select id="checkDeptExistUser" parameterType="Long" resultType="int"> select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0' </select> @@ -93,6 +100,10 @@ where SU.user_id = #{userId} </select> + <select id="selectByName" parameterType="string" resultType="long"> + SELECT dept_id FROM sys_dept WHERE dept_name = #{name} and del_flag = '0' limit 1 + </select> + <insert id="insertDept" parameterType="SysDept"> insert into sys_dept( <if test="deptId != null and deptId != 0">dept_id,</if> -- Gitblit v1.8.0