查询角色通用接口,调整角色类型为数组,支持多类型查询

This commit is contained in:
陈维伟 2023-09-20 15:25:09 +08:00
parent 3325b75321
commit 3310fdfd6f
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ public class QuerySaasRoleReq {
/**
* 角色类型common 自定义角色 admin管理员 init标准角色
*/
private String roleType;
private List<String> roleType;
/**
* 工作台类型编码

View File

@ -178,7 +178,7 @@ public class RoleServiceImpl implements RoleService {
List<SaasRole> list = saasRoleDao.lambdaQuery()
.in(CollectionUtils.isNotEmpty(req.getIds()), BaseEntity::getId, req.getIds())
.in(CollectionUtils.isNotEmpty(groupRelation), BaseEntity::getId, groupRelation.stream().map(SaasRoleGroupRelation::getRoleId).collect(Collectors.toList()))
.eq(StringUtils.isNotBlank(req.getRoleType()), SaasRole::getRoleType, req.getRoleType())
.in(CollectionUtils.isNotEmpty(req.getRoleType()), SaasRole::getRoleType, req.getRoleType())
.in(CollectionUtils.isNotEmpty(req.getWorkspaceId()),SaasRole::getWorkspaceId,req.getWorkspaceId())
.in(CollectionUtils.isNotEmpty(req.getOuId()),SaasRole::getOwnerOuId,req.getOuId())
.orderByDesc(BaseEntity::getId)