瀏覽代碼

更新

tags/v2.4.1
xiaoying 1 年之前
父節點
當前提交
536ea010eb
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

+ 2
- 2
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java 查看文件

//现有对比 拿出不需要的数据进行删除 //现有对比 拿出不需要的数据进行删除
List<ClientRoleDto> deleteClientRoleDtoList; List<ClientRoleDto> deleteClientRoleDtoList;
List<ClientRoleDto> insertClientRoleDtoList; List<ClientRoleDto> insertClientRoleDtoList;
deleteClientRoleDtoList = list.stream().filter(t -> !deleteList.contains(t)).collect(Collectors.toList());
deleteClientRoleDtoList = clientRoleDtoList.stream().filter(t -> !list.contains(t)).collect(Collectors.toList());
//新增 //新增
insertClientRoleDtoList = clientRoleDtoList.stream().filter(t -> !list.contains(t)).collect(Collectors.toList());
insertClientRoleDtoList = list.stream().filter(t -> !deleteClientRoleDtoList.contains(t)).collect(Collectors.toList());
clientTenantDto.setClientRoleDtoList(deleteClientRoleDtoList); clientTenantDto.setClientRoleDtoList(deleteClientRoleDtoList);
//符合先删后增逻辑 则直接将原有租户已经对应的关联业务数据清除 //符合先删后增逻辑 则直接将原有租户已经对应的关联业务数据清除
JsonResult jsonResult = deleteTenant(clientTenantDto, loginUser); JsonResult jsonResult = deleteTenant(clientTenantDto, loginUser);

Loading…
取消
儲存