|
|
|
|
|
|
|
|
if (clientUserMapper.judgeCreateByUserName(createClientTenantDto.getUsername()) > 0) { |
|
|
if (clientUserMapper.judgeCreateByUserName(createClientTenantDto.getUsername()) > 0) { |
|
|
return JsonResult.error("该用户账号已存在!"); |
|
|
return JsonResult.error("该用户账号已存在!"); |
|
|
} |
|
|
} |
|
|
|
|
|
//新增校验 |
|
|
|
|
|
for (ClientRoleDto clientRoleDto : createClientTenantDto.getClientRoleDtoList()) { |
|
|
|
|
|
if (ObjectUtil.isEmpty(clientRoleDto.getClientId()) || ObjectUtil.isNull(clientRoleDto.getRoleId())) { |
|
|
|
|
|
return JsonResult.error("业务系统关联相关角色id或者标识不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
createClientTenantDto.setPassword(passward); |
|
|
createClientTenantDto.setPassword(passward); |
|
|
//创建租户创建成功后的返回实体类 |
|
|
//创建租户创建成功后的返回实体类 |
|
|
CreateTenantVo vo = new CreateTenantVo(); |
|
|
CreateTenantVo vo = new CreateTenantVo(); |
|
|
|
|
|
|
|
|
//现有list |
|
|
//现有list |
|
|
List<ClientRoleDto> list = dto.getClientRoleDtoList(); |
|
|
List<ClientRoleDto> list = dto.getClientRoleDtoList(); |
|
|
if (CollectionUtil.isEmpty(list)) { |
|
|
if (CollectionUtil.isEmpty(list)) { |
|
|
return JsonResult.success("租户关联的业务平台系统不能为空"); |
|
|
|
|
|
|
|
|
return JsonResult.error("租户关联的业务平台系统不能为空"); |
|
|
} |
|
|
} |
|
|
|
|
|
//新增校验 |
|
|
|
|
|
for (ClientRoleDto clientRoleDto : list) { |
|
|
|
|
|
if (ObjectUtil.isEmpty(clientRoleDto.getClientId()) || ObjectUtil.isNull(clientRoleDto.getRoleId())) { |
|
|
|
|
|
return JsonResult.error("业务系统关联相关角色id或者标识不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
log.info("现有集合:{}", list.toString()); |
|
|
log.info("现有集合:{}", list.toString()); |
|
|
//现有集合 |
|
|
//现有集合 |
|
|
List<ClientRoleDto> clientRoleDtos = getClientRoleDtos(list); |
|
|
List<ClientRoleDto> clientRoleDtos = getClientRoleDtos(list); |