移除部门删除时的用户存在检查,调整用户公司ID设置逻辑

This commit is contained in:
syruan 2025-09-22 17:27:49 +08:00
parent 71eb920296
commit 2fbdced14d
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
#Fri Sep 19 09:07:56 CST 2025
#Mon Sep 22 16:39:34 CST 2025
anotherKey=anotherValue
key=value
anotherKey1=anotherValue1

View File

@ -146,9 +146,9 @@ public class SysDeptController extends BaseController
if (deptService.hasChildByDeptId(deptId)) {
return warn("存在下级部门,不允许删除");
}
if (deptService.checkDeptExistUser(deptId)) {
return warn("部门存在用户,不允许删除");
}
// if (deptService.checkDeptExistUser(deptId)) {
// return warn("部门存在用户,不允许删除");
// }
deptService.checkDeptDataScope(deptId);
return toAjax(deptService.deleteDeptById(deptId));
}catch (Exception e){

View File

@ -109,7 +109,7 @@ public class SysUserServiceImpl implements ISysUserService {
String phone =user.getPhonenumber().replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_");
user.setPhonenumber(phone);
}
user.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
//user.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
List<SysUser> sysUsers = userMapper.selectUserList(user);
return sysUsers;
}