refactor(role-query): relation查询过滤ou和workspace
This commit is contained in:
parent
707e748a64
commit
5f702191dd
@ -462,7 +462,9 @@ public class RoleServiceImpl implements RoleService {
|
||||
//反查relation
|
||||
List<Long> roleIds = rolePage.getRecords().stream().map(SaasRole::getId).collect(Collectors.toList());
|
||||
List<SaasRoleUserRelation> relationList = saasRoleUserRelationDao.list(new LambdaQueryWrapper<SaasRoleUserRelation>().
|
||||
in(SaasRoleUserRelation::getRoleId, roleIds));
|
||||
in(SaasRoleUserRelation::getRoleId, roleIds)
|
||||
.eq(SaasRoleUserRelation::getOuId, req.getOuId())
|
||||
.eq(SaasRoleUserRelation::getWorkspaceId, req.getWorkspaceId()));
|
||||
Map<Long, List<SaasRoleUserRelation>> relationMap = relationList.stream().collect(Collectors.groupingBy(SaasRoleUserRelation::getRoleId));
|
||||
|
||||
// 结果组装 - 用户信息到yoke组装
|
||||
|
||||
Loading…
Reference in New Issue
Block a user