Commit a4a753c7 by 李小龙

fix

parent 78c5a17a
...@@ -12,7 +12,6 @@ import com.makeit.common.page.PageVO; ...@@ -12,7 +12,6 @@ import com.makeit.common.page.PageVO;
import com.makeit.dto.platform.auth.PlatOrgSplitDTO; import com.makeit.dto.platform.auth.PlatOrgSplitDTO;
import com.makeit.entity.platform.auth.PlatOrg; import com.makeit.entity.platform.auth.PlatOrg;
import com.makeit.entity.platform.auth.PlatRole; import com.makeit.entity.platform.auth.PlatRole;
import com.makeit.entity.platform.auth.PlatRoleOrg;
import com.makeit.entity.platform.auth.PlatUserRole; import com.makeit.entity.platform.auth.PlatUserRole;
import com.makeit.entity.platform.space.PlatSpace; import com.makeit.entity.platform.space.PlatSpace;
import com.makeit.enums.CodeMessageEnum; import com.makeit.enums.CodeMessageEnum;
...@@ -436,12 +435,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg> ...@@ -436,12 +435,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
if (CollectionUtils.isEmpty(userRoleList)) { if (CollectionUtils.isEmpty(userRoleList)) {
return new HashSet<>(); return new HashSet<>();
} }
List<PlatRoleOrg> roleOrgList = platRoleOrgService.getByRoleIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toSet())); // List<PlatRoleOrg> roleOrgList = platRoleOrgService.getByRoleIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toSet()));
if (CollectionUtils.isEmpty(roleOrgList)) { // if (CollectionUtils.isEmpty(roleOrgList)) {
return new HashSet<>(); // return new HashSet<>();
} // }
//return roleOrgList.stream().map(PlatRoleOrg::getOrgId).collect(Collectors.toSet()); //return roleOrgList.stream().map(PlatRoleOrg::getOrgId).collect(Collectors.toSet());
List<PlatRole> roleList = platRoleService.listByIds(roleOrgList.stream().map(PlatRoleOrg::getRoleId).collect(Collectors.toList())); List<PlatRole> roleList = platRoleService.listByIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toList()));
return roleList.stream().flatMap(vo -> Stream.of(Optional.ofNullable(vo.getDataScope()).orElse(new String()) .split(","))).collect(Collectors.toSet()); return roleList.stream().flatMap(vo -> Stream.of(Optional.ofNullable(vo.getDataScope()).orElse(new String()) .split(","))).collect(Collectors.toSet());
} }
/** /**
......
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