Sfoglia il codice sorgente

权限设置不存在 直接返回空集合

zhou-hao 7 anni fa
parent
commit
5fcd29aa62

+ 3 - 0
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorizationSettingService.java

@@ -209,6 +209,9 @@ public class SimpleAuthorizationSettingService extends GenericEntityService<Auth
             return null;
         }
         List<AuthorizationSettingEntity> entities = getUserSetting(userId);
+        if(entities.isEmpty()){
+            return Collections.emptyList();
+        }
         //用户持有的权限设置id集合
         List<String> settingIdList = entities.stream()
                 .map(AuthorizationSettingEntity::getId)