Browse Source

租户创建(对接高速,航道,飞手业务平台)

tags/v2.4.1
xiaoying 1 year ago
parent
commit
367ea1f91c
9 changed files with 48 additions and 23 deletions
  1. +10
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/FreeWayConstant.java
  2. +9
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WaterWayConstant.java
  3. +8
    -8
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java
  4. +17
    -13
      tuoheng_oidc_admin/src/main/java/com/tuoheng/third/service/impl/ThirdServiceImpl.java
  5. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/controller/TenantController.class
  6. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/model/param/CreateClientTenantDto.class
  7. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/model/po/TenantPo.class
  8. +0
    -1
      tuoheng_oidc_admin/target/classes/mapper/ClientUserMapper.xml
  9. +4
    -1
      tuoheng_oidc_admin/target/classes/mapper/TenantMapper.xml

+ 10
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/FreeWayConstant.java View File

@@ -33,4 +33,14 @@ public class FreeWayConstant {
* 逻辑删除租户
*/
public static final String DELETE_TENANT = "/oidc/callback/tenant/deleted";

/**
* 查询可用角色
*/
public static final String FIND_ROLE = "/oidc/callback/getRoleList";

/**
* 查询可用角色
*/
public static final String FIND_MENU = "/oidc/callback/getMenuList/{roleId}";
}

+ 9
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WaterWayConstant.java View File

@@ -34,4 +34,13 @@ public class WaterWayConstant {
* 逻辑删除租户
*/
public static final String DELETE_TENANT = "/oidc/callback/tenant/deleted";
/**
* 查询可用角色
*/
public static final String FIND_ROLE = "/oidc/callback/getRoleList";

/**
* 查询可用角色
*/
public static final String FIND_MENU = "/oidc/callback/getMenuList/{roleId}";
}

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

@@ -214,14 +214,14 @@ public class TenantServiceImpl implements TenantService {
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_ADMIN, dto, clientRoleDtoList);
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_MP, dto, clientRoleDtoList);
break;
////暂时河湖长,动态匹配其他平台
//case HhzUrlConstant.HHZ_CLIENT:
// dto.setClientId(HhzUrlConstant.HHZ_CLIENT_ADMIN);
// clientRoleDtoList.add(dto);
// clientRoleDto.setClientId(HhzUrlConstant.HHZ_CLIENT_MP);
// clientRoleDto.setRoleId(dto.getRoleId());
// clientRoleDtoList.add(clientRoleDto);
// break;
case FreeWayConstant.FREEWAY_CLIENT:
addClientRoleDtoList(FreeWayConstant.FREEWAY_CLIENT_ADMIN, dto, clientRoleDtoList);
addClientRoleDtoList(FreeWayConstant.FREEWAY_CLIENT_MP, dto, clientRoleDtoList);
break;
case WaterWayConstant.WATERWAY_CLIENT:
addClientRoleDtoList(WaterWayConstant.WATERWAY_CLIENT_ADMIN, dto, clientRoleDtoList);
addClientRoleDtoList(WaterWayConstant.WATERWAY_CLIENT_MP, dto, clientRoleDtoList);
break;
default:
break;
}

+ 17
- 13
tuoheng_oidc_admin/src/main/java/com/tuoheng/third/service/impl/ThirdServiceImpl.java View File

@@ -4,9 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.common.CommonConfig;
import com.tuoheng.common.ServiceException;
import com.tuoheng.constant.CommonConstant;
import com.tuoheng.constant.DspConstant;
import com.tuoheng.constant.HhzUrlConstant;
import com.tuoheng.constant.*;
import com.tuoheng.mapper.PlatformMapper;
import com.tuoheng.model.dto.ClientRoleListDto;
import com.tuoheng.model.dto.LoginUser;
@@ -141,6 +139,14 @@ public class ThirdServiceImpl implements ThirdService {
case HhzUrlConstant.HHZ_CLIENT:
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), HhzUrlConstant.FIND_MENU);
break;
//高速
case FreeWayConstant.FREEWAY_CLIENT:
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), FreeWayConstant.FIND_MENU);
break;
//航道
case WaterWayConstant.WATERWAY_CLIENT:
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), WaterWayConstant.FIND_MENU);
break;
default:
break;
}
@@ -195,16 +201,14 @@ public class ThirdServiceImpl implements ThirdService {
//case AirportConstant.AIRPORT_CLIENT:
// url = url + AirportConstant.CREATE_TENANT;
// break;
////高速
//case FreeWayConstant.FREEWAY_CLIENT:
// url = url + FreeWayConstant.CREATE_TENANT;
// dto.getClientRoleDto().setClientId(FreeWayConstant.FREEWAY_CLIENT_ADMIN + CommonConstant.COMMA + FreeWayConstant.FREEWAY_CLIENT_MP);
// break;
////航道
//case WaterWayConstant.WATERWAY_CLIENT:
// url = url + WaterWayConstant.CREATE_TENANT;
// dto.getClientRoleDto().setClientId(WaterWayConstant.WATERWAY_CLIENT_ADMIN + CommonConstant.COMMA + WaterWayConstant.WATERWAY_CLIENT_MP);
// break;
//高速
case FreeWayConstant.FREEWAY_CLIENT:
url = url + FreeWayConstant.FIND_ROLE;
break;
//航道
case WaterWayConstant.WATERWAY_CLIENT:
url = url + WaterWayConstant.FIND_ROLE;
break;
////飞手
//case PilotConstant.PILOT_CLIENT:
// url = url + PilotConstant.CREATE_TENANT;

BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/controller/TenantController.class View File


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/model/param/CreateClientTenantDto.class View File


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/model/po/TenantPo.class View File


+ 0
- 1
tuoheng_oidc_admin/target/classes/mapper/ClientUserMapper.xml View File

@@ -29,7 +29,6 @@
is_tenant
FROM users
WHERE id = #{userId}
and enabled = 1
</select>
<select id="selectByTenantId" resultType="com.tuoheng.model.po.UserPo">
SELECT *

+ 4
- 1
tuoheng_oidc_admin/target/classes/mapper/TenantMapper.xml View File

@@ -22,6 +22,9 @@
<if test="enabled != null">
enabled = #{enabled},
</if>
<if test="status != null">
status = #{status},
</if>
province_code=#{provinceCode},
province_name=#{provinceName},
city_code =#{cityCode},
@@ -48,7 +51,7 @@
,t.province_code,t.province_name,t.city_code,t.city_name,t.district_code,t.district_name,u.username
username,t.update_time updateTime,t.create_time createTime
FROM t_tenant t,users u
WHERE t.enabled = 1 and u.enabled =1 and t.user_id =u.id
WHERE t.enabled = 1 and t.user_id =u.id
<if test="query.tenantName != null and query.tenantName != ''">
and t.name LIKE concat('%',#{query.tenantName},'%')
</if>

Loading…
Cancel
Save