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