设置代班长接口添加roleId
This commit is contained in:
parent
238df67263
commit
49fa464f52
@ -39,7 +39,7 @@ public interface TyrSaasRoleUserApi {
|
||||
|
||||
|
||||
/**
|
||||
* 授权或者取消授权班组管理员或者项目代班长
|
||||
* 授权或者取消授权班组管理员或者项目代班长、小组长
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -11,6 +11,8 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -33,6 +35,12 @@ public class WorkerManagerRoleUserReq {
|
||||
*/
|
||||
private List<Long> permissionGroupId;
|
||||
|
||||
/**
|
||||
* 角色ID 会与权限集ID取并集
|
||||
*/
|
||||
private Collection<Long> roleId;
|
||||
|
||||
|
||||
private IdentityType identityType;
|
||||
@NotNull
|
||||
|
||||
|
||||
@ -333,7 +333,15 @@ public class RoleUserService implements SaasRoleUserService {
|
||||
if (CollectionUtil.isNotEmpty(req.getPermissionGroupId())) {
|
||||
saasPgroupRoleRelations = saasPgroupRoleRelationDao.listByGroupIds(req.getPermissionGroupId());
|
||||
}
|
||||
List<SaasRole> roleInfos = saasRoleDao.findInitRole(saasPgroupRoleRelations.stream().map(SaasPgroupRoleRelation::getRoleId).collect(Collectors.toSet()));
|
||||
|
||||
List<SaasRole> roleInfos = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(saasPgroupRoleRelations)) {
|
||||
roleInfos.addAll(saasRoleDao.findInitRole(saasPgroupRoleRelations.stream().map(SaasPgroupRoleRelation::getRoleId).collect(Collectors.toSet())));
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(req.getRoleId())) {
|
||||
roleInfos.addAll(saasRoleDao.listByIds(req.getRoleId()));
|
||||
}
|
||||
|
||||
|
||||
RoleUserInfo roleUserBaseInfo = RoleUserInfo.builder()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user