优化数据类型

This commit is contained in:
不做码农
2023-05-15 19:52:54 +08:00
parent caf7d707c3
commit efcb5128c3
13 changed files with 176 additions and 163 deletions

View File

@@ -155,11 +155,11 @@ namespace ZR.Admin.WebApi.Controllers.System
{
return ToResponse(GetApiResult(ResultCode.CUSTOM_ERROR, $"存在下级部门,不允许删除"));
}
if (UserService.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, $"部门存在用户,不允许删除"));
}
return SUCCESS(DeptService.Delete(deptId));
}
}