ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -66,7 +66,8 @@ </select> <select id="checkDeptExistUser" parameterType="Long" resultType="int"> select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0' select (select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0') + (select count(1) from t_employee where dept_id = #{deptId} and del_flag = '0') </select> <select id="hasChildByDeptId" parameterType="Long" resultType="int"> @@ -156,4 +157,4 @@ update sys_dept set del_flag = '2' where dept_id = #{deptId} </delete> </mapper> </mapper>