소스 검색

Merge branch 'develop' of gitadmin/tuoheng_oidc into release

tags/v2.4.1
xuziqing 1 년 전
부모
커밋
a98f977069
1개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. +4
    -8
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

+ 4
- 8
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java 파일 보기

@@ -591,17 +591,13 @@ public class TenantServiceImpl implements TenantService {
tenantEmploys.forEach(t -> tenantEmployMapper.deleteById(t));
//现有list
List<ClientRoleDto> list = dto.getClientRoleDtoList();
//有集合
//有集合
List<ClientRoleDto> clientRoleDtos = getClientRoleDtos(list);
List<ClientRoleDto> deleteClientRoleDtoList;
//新的租户关联的平台集合
//原有集合
List<ClientRoleDto> finalClientRoleDtoList = getClientRoleDtos(clientRoleDtoList);
//筛选出一样的则不做相关操作
//删除租户原始权限
deleteClientRoleDtoList = clientRoleDtos.stream().filter(t -> !finalClientRoleDtoList.contains(t)).collect(Collectors.toList());
deleteClientRoleDtoList = getClientRoleDtos(deleteClientRoleDtoList);
clientRoleDtos = clientRoleDtos.stream().filter(t -> !list.contains(t)).collect(Collectors.toList());
for (ClientRoleDto clientRoleDto : deleteClientRoleDtoList) {
//删除租户所有原始权限
for (ClientRoleDto clientRoleDto : finalClientRoleDtoList) {
clientUserRoleMapper.deleteByUserIdAndClient(tenant.getUserId(), clientRoleDto.getClientId());
authoritiesMapper.deleteByUserIdAndClient(tenant.getUserId(), clientRoleDto.getClientId());


Loading…
취소
저장