ソースを参照

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());


読み込み中…
キャンセル
保存