Merge remote-tracking branch 'origin/feature/REQ-1502' into feature/REQ-1502
This commit is contained in:
commit
9782249c3e
@ -62,7 +62,7 @@ public interface TyrSaasRoleApi {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/api/saasRole/queryByIdentityIdType")
|
||||
ApiResult<List<SaasRoleVO>> queryByIdentityIdType(@RequestParam(required = true) Long identityId,@RequestParam(required = true) Integer identityType,@RequestParam(required = true) Long workspaceId,@RequestParam(required = true) Long ouId);
|
||||
ApiResult<List<SaasRoleVO>> queryByIdentityIdType(@RequestParam(required = true) Long identityId,@RequestParam(required = true) Integer identityType,@RequestParam(required = true) Long workspaceId,@RequestParam(required = true) Long ouId,@RequestParam(required = true) Boolean includePermissionGroup);
|
||||
|
||||
/**
|
||||
* 根据身份id身份类型查询权限列表(批量,只返回角色信息)
|
||||
|
||||
@ -68,8 +68,8 @@ public class SaasRoleController implements TyrSaasRoleApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<List<SaasRoleVO>> queryByIdentityIdType(Long identityId, Integer identityType,Long workspaceId,Long ouId) {
|
||||
return ApiResult.ok(roleService.queryByIdentityIdType(identityId, identityType,workspaceId,ouId, false));
|
||||
public ApiResult<List<SaasRoleVO>> queryByIdentityIdType(Long identityId, Integer identityType,Long workspaceId,Long ouId,Boolean includePermissionGroup) {
|
||||
return ApiResult.ok(roleService.queryByIdentityIdType(identityId, identityType,workspaceId,ouId, includePermissionGroup));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -181,6 +181,8 @@ public class CMSRoleJobHandler extends IJobHandler {
|
||||
.in(SaasRoleUserRelation::getRoleId,oldRoleId)
|
||||
.set(SaasRoleUserRelation::getRoleId,newRole.getId())
|
||||
.update();
|
||||
// 删除老角色
|
||||
deleteRoleId.addAll(oldRoleList.stream().map(BaseEntity::getId).collect(Collectors.toSet()));
|
||||
|
||||
// 根据角色id查询角色权限集关联关系
|
||||
List<SaasPreGroupRoleRelation> pgroupRoleRelation = saasPreGroupRoleRelationDao.lambdaQuery()
|
||||
@ -241,7 +243,6 @@ public class CMSRoleJobHandler extends IJobHandler {
|
||||
pgroupRoleRelationDao.save(saasPgroupRoleRelation);
|
||||
|
||||
// 补充待删除数据
|
||||
deleteRoleId.addAll(oldRoleList.stream().map(BaseEntity::getId).collect(Collectors.toSet()));
|
||||
deleteSaasPermissionGroupId.addAll(oldPermissionGroup.stream().map(BaseEntity::getId).collect(Collectors.toSet()));
|
||||
deletePgroupPermissionRelationId.addAll(oldPgroupPermissionRelation.stream().map(BaseEntity::getId).collect(Collectors.toSet()));
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user