From afcd19a3fb5c5de5c134ef819d9677595ce5f822 Mon Sep 17 00:00:00 2001 From: TzBluesky28 <61043157@qq.com> Date: Wed, 10 May 2023 11:08:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BB=84=E7=BB=87=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E8=81=8C=E4=BD=8D=E5=AD=98=E5=9C=A8=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E7=94=A8=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleAdmin.System/Services/System/Org/SysOrgService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs b/api/SimpleAdmin/SimpleAdmin.System/Services/System/Org/SysOrgService.cs index 438e2b3..97f684c 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();//刷新缓存 -- Gitee