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; ...@@ -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());
} }
/** /**
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</foreach> </foreach>
</if> </if>
<if test="orgType != null and orgType != ''"> <if test="orgType != null and orgType != ''">
AND ps.type = #{orgType} AND ps.attribute = #{orgType}
</if> </if>
</where> </where>
</select> </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