Parcourir la source

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

zuohuaijun il y a 2 ans
Parent
commit
969f86c46a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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)
         if (roleList != null && roleList.Count > 0)
         {
         {
-            roleList.ForEach(async u =>
+            roleList.ForEach(u =>
             {
             {
                 if (u.DataScope == DataScopeEnum.Define)
                 if (u.DataScope == DataScopeEnum.Define)
                 {
                 {
@@ -341,7 +341,7 @@ public class SysOrgService : IDynamicApiController, ITransient
                 {
                 {
                     strongerDataScopeType = (int)u.DataScope;
                     strongerDataScopeType = (int)u.DataScope;
                     // 根据数据范围获取机构集合
                     // 根据数据范围获取机构集合
-                    var orgIds = await GetOrgIdListByDataScope(strongerDataScopeType);
+                    var orgIds = GetOrgIdListByDataScope(strongerDataScopeType).GetAwaiter().GetResult();
                     dataScopeOrgIdList = dataScopeOrgIdList.Union(orgIds).ToList();
                     dataScopeOrgIdList = dataScopeOrgIdList.Union(orgIds).ToList();
                 }
                 }
             });
             });