feat: Enhance department management with parent ID validation and department scope handling

This commit is contained in:
2026-07-16 09:25:35 +08:00
parent e21e51de8a
commit 8dea752d48
7 changed files with 81 additions and 14 deletions

View File

@@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDeptById" 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 d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
where d.dept_id = #{deptId}
@@ -156,4 +156,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
</mapper>
</mapper>