diff --git a/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs b/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs index 438e2b3488bd9d65f2899eb43567188a14e26401..97f684cf400d96c29102360e1fb63e77209736dc 100644 --- a/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs +++ b/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs @@ -261,7 +261,7 @@ public class SysOrgService : DbRepository, ISysOrgService if (hasRole) throw Oops.Bah($"请先删除{name}下的角色"); // 判断组织下是否有职位 var hasPosition = await Context.Queryable().Where(it => sysDeleteOrgList.Contains(it.OrgId)).CountAsync() > 0; - if (hasRole) throw Oops.Bah($"请先删除{name}下的职位"); + if (hasPosition) throw Oops.Bah($"请先删除{name}下的职位"); //删除组织 if (await DeleteByIdsAsync(sysDeleteOrgList.Cast().ToArray())) await RefreshCache();//刷新缓存