Browse Source

Merge branch 'develop' of gitadmin/tuoheng_oidc into release

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

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

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);

Loading…
Cancel
Save