Commit dd3e329e by 杨伟程
parents 0bdc070c 479929a6
......@@ -46,6 +46,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -436,9 +437,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
return new HashSet<>();
}
List<PlatRole> roleList = platRoleService.listByIds(roleOrgList.stream().map(PlatRoleOrg::getRoleId).collect(Collectors.toList()));
return roleList.stream().flatMap(vo -> Stream.of(vo.getDataScope().split(","))).collect(Collectors.toSet());
return roleList.stream().flatMap(vo -> Stream.of(Optional.ofNullable(vo.getDataScope()).orElse(new String()) .split(","))).collect(Collectors.toSet());
}
/**
* 租户权限的组织树
* @param orgList
......
......@@ -423,7 +423,7 @@ implements PlatRoleService {
*/
@Override
public List<PlatRole> belongTo(BaseIdDTO baseIdDTO) {
PlatUserVO userVO = PlatUserUtil.getUserVO();
PlatUserVO userVO = PlatUserUtil.getUserVOCanNull();
if(StringUtils.equals(userVO.getIsTenant(),CommonEnum.YES.getValue())){
return this.list(new LambdaQueryWrapper<PlatRole>().orderByDesc(BaseEntity::getUpdateDate));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment