Browse Source

更新

tags/v2.4.1
xiaoying 1 year ago
parent
commit
cecab97c62
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

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

.eq(TenantEmploy::getTenantId, dto.getId())); .eq(TenantEmploy::getTenantId, dto.getId()));
tenantEmploys.forEach(t -> tenantEmployMapper.deleteById(t)); tenantEmploys.forEach(t -> tenantEmployMapper.deleteById(t));
//新增租户关联业务服务实例相关 //新增租户关联业务服务实例相关
StringBuilder PlatformName = new StringBuilder();
StringBuilder platformName = new StringBuilder();
log.info(dto.getClientRoleDtoList().toString()); log.info(dto.getClientRoleDtoList().toString());
for (ClientRoleDto clientRoleDto : list) { for (ClientRoleDto clientRoleDto : list) {
//获取clientId查询对应平台获取平台名称 //获取clientId查询对应平台获取平台名称
if (ObjectUtil.isNull(platform)) { if (ObjectUtil.isNull(platform)) {
return JsonResult.error("该业务平台不存在"); return JsonResult.error("该业务平台不存在");
} }
PlatformName.append(platform.getPlatformName());
PlatformName.append(CommonConstant.SIGN);
platformName.append(platform.getPlatformName());
platformName.append(CommonConstant.SIGN);
TenantEmploy tenantEmploy = new TenantEmploy(); TenantEmploy tenantEmploy = new TenantEmploy();
tenantEmploy.setTenantId(dto.getId()); tenantEmploy.setTenantId(dto.getId());
tenantEmploy.setPlatformCode(clientRoleDto.getClientId()); tenantEmploy.setPlatformCode(clientRoleDto.getClientId());
tenantEmployMapper.insert(tenantEmploy); tenantEmployMapper.insert(tenantEmploy);
} }
//拼接 //拼接
vo.setPlatformName(PlatformName.substring(CommonConstant.ZERO, PlatformName.lastIndexOf(CommonConstant.SIGN)));
vo.setPlatformName(platformName.substring(CommonConstant.ZERO, platformName.lastIndexOf(CommonConstant.SIGN)));
log.info("租户更新的业务服务实例表更新完毕"); log.info("租户更新的业务服务实例表更新完毕");
//更新租户原有数据基本 //更新租户原有数据基本
BeanUtils.copyProperties(dto, tenant); BeanUtils.copyProperties(dto, tenant);

Loading…
Cancel
Save