This commit is contained in:
不做码农
2021-11-18 14:15:29 +08:00
3 changed files with 3 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ namespace ZR.Admin.WebApi.Controllers.System
{
return ToResponse(GetApiResult(ResultCode.CUSTOM_ERROR, $"存在下级部门,不允许删除"));
}
if (DeptService.Queryable().Count(it => it.DeptId == deptId && it.DelFlag == "0") > 0)
if (UserService.Queryable().Count(it => it.DeptId == deptId && it.DelFlag == "0") > 0)
{
return ToResponse(GetApiResult(ResultCode.CUSTOM_ERROR, $"部门存在用户,不允许删除"));
}