取消板件自动写入,bug1255,1225

This commit is contained in:
lym
2025-02-20 16:27:40 +08:00
parent 2e34c68a90
commit c26b357f14
20 changed files with 565 additions and 75 deletions
@@ -114,6 +114,10 @@ public class DeptServiceImpl implements DeptService {
}
// 校验部门内用户操作
checkCurrentWhenOperate(id);
// 校验部门内是否存在用户,存在用户则禁止删除
if (!userService.getUserListByDeptIds(Collections.singletonList(id)).isEmpty()) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.DEPT_EXITS_USER);
}
// 删除部门
deptMapper.deleteById(id);
// 删除关联的用户