|
|
|
|
|
|
|
|
IPage<TenantPo> pageData = tenantMapper.findList(page, query); |
|
|
IPage<TenantPo> pageData = tenantMapper.findList(page, query); |
|
|
pageData.convert(x -> { |
|
|
pageData.convert(x -> { |
|
|
TenantVo vo = Convert.convert(TenantVo.class, x); |
|
|
TenantVo vo = Convert.convert(TenantVo.class, x); |
|
|
|
|
|
vo.setId(x.getUserId()); |
|
|
vo.setTenantCode(x.getCode()); |
|
|
vo.setTenantCode(x.getCode()); |
|
|
vo.setTenantName(x.getName()); |
|
|
vo.setTenantName(x.getName()); |
|
|
Long userId = x.getUserId(); |
|
|
Long userId = x.getUserId(); |
|
|
|
|
|
|
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台新增租户失败"); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台新增租户失败"); |
|
|
} |
|
|
} |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
log.error("业务平台新增租户响应失败" + response.getBody()); |
|
|
|
|
|
|
|
|
log.error("业务平台更新租户响应失败, 业务平台标识:" + dto.getClientId()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
} |
|
|
} |
|
|
return JsonResult.success(); |
|
|
return JsonResult.success(); |
|
|
|
|
|
|
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败"); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败"); |
|
|
} |
|
|
} |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
log.error("业务平台更新租户响应失败" + response.getBody()); |
|
|
|
|
|
|
|
|
log.error("业务平台更新租户响应失败, 业务平台标识:" + dto.getClientId()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
} |
|
|
} |
|
|
return JsonResult.success(); |
|
|
return JsonResult.success(); |
|
|
|
|
|
|
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台删除租户失败"); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台删除租户失败"); |
|
|
} |
|
|
} |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
if (response.getBody().getCode() != JsonResult.SUCCESS) { |
|
|
log.error("业务平台删除租户响应失败" + response.getBody()); |
|
|
|
|
|
|
|
|
log.error("业务平台更新租户响应失败, 业务平台标识:" + dto.getClientId()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), response.getBody().getMsg()); |
|
|
} |
|
|
} |
|
|
return JsonResult.success(); |
|
|
return JsonResult.success(); |