Commit 301258a4 by huangjy

Merge remote-tracking branch 'origin/dev' into dev

parents e1bdb089 a4a753c7
......@@ -12,7 +12,6 @@ import com.makeit.common.page.PageVO;
import com.makeit.dto.platform.auth.PlatOrgSplitDTO;
import com.makeit.entity.platform.auth.PlatOrg;
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.space.PlatSpace;
import com.makeit.enums.CodeMessageEnum;
......@@ -436,12 +435,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
if (CollectionUtils.isEmpty(userRoleList)) {
return new HashSet<>();
}
List<PlatRoleOrg> roleOrgList = platRoleOrgService.getByRoleIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toSet()));
if (CollectionUtils.isEmpty(roleOrgList)) {
return new HashSet<>();
}
// List<PlatRoleOrg> roleOrgList = platRoleOrgService.getByRoleIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toSet()));
// if (CollectionUtils.isEmpty(roleOrgList)) {
// return new HashSet<>();
// }
//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());
}
/**
......
......@@ -44,7 +44,7 @@
</foreach>
</if>
<if test="orgType != null and orgType != ''">
AND ps.type = #{orgType}
AND ps.attribute = #{orgType}
</if>
</where>
</select>
......
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