feat: (feature/REQ-2595) 临时接口增加roleName返回
This commit is contained in:
parent
113846ac9c
commit
55f1de7db4
@ -34,6 +34,8 @@ public class PageRoleUserRelationReq{
|
||||
|
||||
private Boolean includeDelete;
|
||||
|
||||
@NotEmpty(message = "roleIds不能为空")
|
||||
// @NotEmpty(message = "roleIds不能为空")
|
||||
private Set<Long> roleIds;
|
||||
|
||||
private Set<Long> personIds;
|
||||
}
|
||||
|
||||
@ -348,24 +348,29 @@ public class RoleUserController implements TyrSaasRoleUserApi {
|
||||
}
|
||||
|
||||
return saasRoleUserRelationService.listV2(ListRoleUserRelationParam.builder()
|
||||
.roleIds(Lists.newArrayList(param.getRoleIds()))
|
||||
.workspaceOuPairs(Optional.ofNullable(param.getWorkspaceOUPairs())
|
||||
.map(e -> e.stream().map(f -> ListRoleUserRelationParam.WorkspaceOuPair.builder()
|
||||
.workspaceId(f.getWorkspaceId())
|
||||
.ouId(f.getOuId())
|
||||
.build())
|
||||
.collect(Collectors.toList()))
|
||||
.orElse(null))
|
||||
.build())
|
||||
.stream()
|
||||
.map(e -> {
|
||||
SaasRoleUserRelationDTO saasRoleUserRelationDTO = SaasRoleUserRelationDTO.builder().build();
|
||||
BeanUtils.copyProperties(e, saasRoleUserRelationDTO);
|
||||
saasRoleUserRelationDTO.setId(e.getId());
|
||||
saasRoleUserRelationDTO.setNaturalPersonId(e.getSaasRoleUser().getPersonId());
|
||||
return saasRoleUserRelationDTO;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
.roleIds(Optional.ofNullable(param.getRoleIds())
|
||||
.map(Lists::newArrayList)
|
||||
.orElse(null))
|
||||
.personIds(Optional.ofNullable(param.getPersonIds())
|
||||
.map(Lists::newArrayList)
|
||||
.orElse(null))
|
||||
.workspaceOuPairs(Optional.ofNullable(param.getWorkspaceOUPairs())
|
||||
.map(e -> e.stream().map(f -> ListRoleUserRelationParam.WorkspaceOuPair.builder()
|
||||
.workspaceId(f.getWorkspaceId())
|
||||
.ouId(f.getOuId())
|
||||
.build())
|
||||
.collect(Collectors.toList()))
|
||||
.orElse(null))
|
||||
.build())
|
||||
.stream()
|
||||
.map(e -> {
|
||||
SaasRoleUserRelationDTO saasRoleUserRelationDTO = SaasRoleUserRelationDTO.builder().build();
|
||||
BeanUtils.copyProperties(e, saasRoleUserRelationDTO);
|
||||
saasRoleUserRelationDTO.setId(e.getId());
|
||||
saasRoleUserRelationDTO.setNaturalPersonId(e.getSaasRoleUser().getPersonId());
|
||||
return saasRoleUserRelationDTO;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -61,6 +61,13 @@
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.personIds != null and param.personIds.size()>0">
|
||||
AND t1.natural_person_id IN
|
||||
<foreach collection="param.personIds" open="(" close=")" separator="," index="index" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user