fix dept delete

This commit is contained in:
samisgod
2021-11-17 14:55:53 +08:00
parent 7f2f1139d6
commit 76859d54c1
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, $"部门存在用户,不允许删除"));
}