Browse Source

😁调整根据角色Id集合获取机构Id集合处理方法

zuohuaijun 2 years ago
parent
commit
969f86c46a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

+ 2 - 2
Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

@@ -330,7 +330,7 @@ public class SysOrgService : IDynamicApiController, ITransient
 
         if (roleList != null && roleList.Count > 0)
         {
-            roleList.ForEach(async u =>
+            roleList.ForEach(u =>
             {
                 if (u.DataScope == DataScopeEnum.Define)
                 {
@@ -341,7 +341,7 @@ public class SysOrgService : IDynamicApiController, ITransient
                 {
                     strongerDataScopeType = (int)u.DataScope;
                     // 根据数据范围获取机构集合
-                    var orgIds = await GetOrgIdListByDataScope(strongerDataScopeType);
+                    var orgIds = GetOrgIdListByDataScope(strongerDataScopeType).GetAwaiter().GetResult();
                     dataScopeOrgIdList = dataScopeOrgIdList.Union(orgIds).ToList();
                 }
             });