Browse Source

Merge branch 'develop' of gitadmin/tuoheng_oidc into release

tags/v2.4.1
xuziqing 1 year ago
parent
commit
a84a23f067
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

+ 8
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java View File

@@ -560,6 +560,7 @@ public class TenantServiceImpl implements TenantService {
}
//现有list
List<ClientRoleDto> list = dto.getClientRoleDtoList();
log.info("现有集合:{}", list.toString());
//现有集合
List<ClientRoleDto> clientRoleDtos = getClientRoleDtos(list);
//租户对应的业务平台相关信息
@@ -571,6 +572,12 @@ public class TenantServiceImpl implements TenantService {
log.info(clientTenantDto.toString());
for (ClientUserRolePo clientUserRolePo : clientUserRolePos) {
ClientRoleDto clientRoleDto = new ClientRoleDto();
TenantEmploy tenantEmploy = tenantEmployMapper.selectOne(Wrappers.<TenantEmploy>lambdaQuery()
.eq(TenantEmploy::getTenantId, dto.getId())
.eq(TenantEmploy::getPlatformCode, clientUserRolePo.getClientId().substring(CommonConstant.ZERO, clientUserRolePo.getClientId().lastIndexOf(CommonConstant.BARS))));
if (ObjectUtil.isNotNull(tenantEmploy)) {
clientRoleDto.setServiceId(tenantEmploy.getServiceId());
}
//此处 暂时格式都为 tuoheng-hhz-web 等格式 如后续维护需要变更形式则此处代码需要更改
clientRoleDto.setRoleId(clientUserRolePo.getRoleId());
clientRoleDto.setRoleName(clientUserRolePo.getRoleName());
@@ -580,6 +587,7 @@ public class TenantServiceImpl implements TenantService {
//原有集合
clientRoleDtoList = clientRoleDtoList.stream().distinct().collect(Collectors.toList());
List<ClientRoleDto> deleteList = clientRoleDtoList;
log.info("原有集合:{}", clientRoleDtoList.toString());
//现有对比 拿出不需要的数据进行删除
List<ClientRoleDto> deleteClientRoleDtoList;
List<ClientRoleDto> insertClientRoleDtoList;

Loading…
Cancel
Save