Selaa lähdekoodia

20241220 付费码管理

lrj 9 kuukautta sitten
vanhempi
commit
70788ee29d
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      PCS/src/main/java/cn/cslg/permission/service/RoleService.java

+ 3 - 3
PCS/src/main/java/cn/cslg/permission/service/RoleService.java

@@ -252,7 +252,7 @@ public class RoleService extends ServiceImpl<RoleMapper, Role> {
         if (roleList == null || roleList.size() == 0) {
             throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据");
         }
-        Role role = roleList.stream().filter(item -> item.getRoleType().equals(1) || item.getRoleType().equals(2)).findFirst().orElse(null);
+        Role role = roleList.stream().filter(item -> item.getRoleType().equals(1) || item.getRoleType().equals(2) ||item.getRoleType().equals(3)).findFirst().orElse(null);
         if (role == null) {
             throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据");
         }
@@ -279,11 +279,11 @@ public class RoleService extends ServiceImpl<RoleMapper, Role> {
         PersonnelVO personnelVO = cacheUtils.getLoginUser(personId);
         List<Role> roleList = this.getRoleByPersonId(personId, applicationCode);
         if (roleList == null || roleList.size() == 0) {
-            throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据");
+            throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据1");
         }
         Role role = roleList.stream().filter(item -> item.getRoleType().equals(1) || item.getRoleType().equals(3)).findFirst().orElse(null);
         if (role == null) {
-            throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据");
+            throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "无权限访问数据2");
         }
         return personnelVO.getTenantId();
     }