瀏覽代碼

Merge branch 'develop' of gitadmin/tuoheng_oidc into release

tags/v2.4.1
xuziqing 1 年之前
父節點
當前提交
1ca419836e
共有 1 個文件被更改,包括 14 次插入1 次删除
  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 查看文件

@@ -92,6 +92,12 @@ public class TenantServiceImpl implements TenantService {
if (clientUserMapper.judgeCreateByUserName(createClientTenantDto.getUsername()) > 0) {
return JsonResult.error("该用户账号已存在!");
}
//新增校验
for (ClientRoleDto clientRoleDto : createClientTenantDto.getClientRoleDtoList()) {
if (ObjectUtil.isEmpty(clientRoleDto.getClientId()) || ObjectUtil.isNull(clientRoleDto.getRoleId())) {
return JsonResult.error("业务系统关联相关角色id或者标识不能为空");
}
}
createClientTenantDto.setPassword(passward);
//创建租户创建成功后的返回实体类
CreateTenantVo vo = new CreateTenantVo();
@@ -561,8 +567,15 @@ public class TenantServiceImpl implements TenantService {
//现有list
List<ClientRoleDto> list = dto.getClientRoleDtoList();
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());
//现有集合
List<ClientRoleDto> clientRoleDtos = getClientRoleDtos(list);

Loading…
取消
儲存