Browse Source

新增查询时添加账号查询,修复url匹配不对应问题

tags/v2.4.1
xiaoying 1 year ago
parent
commit
46e80e06ca
9 changed files with 17 additions and 9 deletions
  1. +3
    -3
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/AirportConstant.java
  2. +3
    -3
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/HhzUrlConstant.java
  3. +4
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/TenantQuery.java
  4. +4
    -3
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java
  5. +3
    -0
      tuoheng_oidc_admin/src/main/resources/mapper/TenantMapper.xml
  6. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/constant/HhzUrlConstant.class
  7. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/controller/TenantController.class
  8. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/model/dto/OidcTenantDto.class
  9. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class

+ 3
- 3
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/AirportConstant.java View File

/** /**
* 创建租户 * 创建租户
*/ */
public static String CREATE_TENANT = "/api/airportInterface/addTenant";
public static final String CREATE_TENANT = "/api/airportInterface/addTenant";
/** /**
* 修改租户 * 修改租户
*/ */
public static String EDIT_TENANT = "/api/airportInterface/editTenant";
public static final String EDIT_TENANT = "/api/airportInterface/editTenant";
/** /**
* 删除租户 * 删除租户
*/ */
public static String DELETE_TENANT = "/api/airportInterface/delTenant";
public static final String DELETE_TENANT = "/api/airportInterface/delTenant";


} }

+ 3
- 3
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/HhzUrlConstant.java View File

/** /**
* 创建租户 * 创建租户
*/ */
public static String CREATE_TENANT = "/oidcTenant/add";
public static final String CREATE_TENANT = "/oidcTenant/add";
/** /**
* 编辑租户 * 编辑租户
*/ */
public static String UPDATE_TENANT = "/oidcTenant/edit";
public static final String UPDATE_TENANT = "/oidcTenant/edit";


public static String DELETE_TENANT = "/oidcTenant/delete";
public static final String DELETE_TENANT = "/oidcTenant/delete";







+ 4
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/TenantQuery.java View File

* 租户名称 * 租户名称
*/ */
private String name; private String name;
/**
* 租户账号
*/
private String username;
} }

+ 4
- 3
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java View File

String url = platform.getPlatformUrl(); String url = platform.getPlatformUrl();


//根据不同业务平台进行动态匹配 //根据不同业务平台进行动态匹配
switch (url){
switch (platform.getPlatformCode()){
//河湖长 //河湖长
case HhzUrlConstant.HHZ_CLIENT: case HhzUrlConstant.HHZ_CLIENT:
url = url + HhzUrlConstant.CREATE_TENANT; url = url + HhzUrlConstant.CREATE_TENANT;
//设置地址(hhz平台) //设置地址(hhz平台)
String url = platform.getPlatformUrl(); String url = platform.getPlatformUrl();
//根据不同业务平台进行动态匹配 //根据不同业务平台进行动态匹配
switch (url){
switch (platform.getPlatformCode()){
//河湖长 //河湖长
case HhzUrlConstant.HHZ_CLIENT: case HhzUrlConstant.HHZ_CLIENT:
url = url + HhzUrlConstant.UPDATE_TENANT; url = url + HhzUrlConstant.UPDATE_TENANT;
log.info("请求url:{}",url); log.info("请求url:{}",url);
ResponseEntity<JsonResult> response; ResponseEntity<JsonResult> response;
try { try {
log.info("请求url:{}",url);
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class);
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败"); throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败");
//设置地址(hhz平台) //设置地址(hhz平台)
String url = platform.getPlatformUrl(); String url = platform.getPlatformUrl();
//根据不同业务平台进行动态匹配 //根据不同业务平台进行动态匹配
switch (url){
switch (platform.getPlatformCode()){
//河湖长 //河湖长
case HhzUrlConstant.HHZ_CLIENT: case HhzUrlConstant.HHZ_CLIENT:
url = url + HhzUrlConstant.DELETE_TENANT; url = url + HhzUrlConstant.DELETE_TENANT;

+ 3
- 0
tuoheng_oidc_admin/src/main/resources/mapper/TenantMapper.xml View File

<if test="query.name != null and query.name != ''"> <if test="query.name != null and query.name != ''">
and name LIKE concat('%',#{query.name},'%') and name LIKE concat('%',#{query.name},'%')
</if> </if>
<if test="query.username != null and query.username != ''">
and username LIKE concat('%',#{query.username},'%')
</if>
ORDER BY create_time desc ORDER BY create_time desc
</select> </select>
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> <select id="selectById" resultType="com.tuoheng.model.po.TenantPo">

BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/constant/HhzUrlConstant.class View File


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


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/model/dto/OidcTenantDto.class View File


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class View File


Loading…
Cancel
Save