@@ -17,14 +17,14 @@ public class AirportConstant { | |||
/** | |||
* 创建租户 | |||
*/ | |||
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"; | |||
} |
@@ -14,13 +14,13 @@ public class HhzUrlConstant { | |||
/** | |||
* 创建租户 | |||
*/ | |||
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"; | |||
@@ -13,4 +13,8 @@ public class TenantQuery extends BaseQuery { | |||
* 租户名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 租户账号 | |||
*/ | |||
private String username; | |||
} |
@@ -431,7 +431,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 | |||
switch (url){ | |||
switch (platform.getPlatformCode()){ | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.CREATE_TENANT; | |||
@@ -489,7 +489,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
//设置地址(hhz平台) | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 | |||
switch (url){ | |||
switch (platform.getPlatformCode()){ | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.UPDATE_TENANT; | |||
@@ -510,6 +510,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
log.info("请求url:{}",url); | |||
ResponseEntity<JsonResult> response; | |||
try { | |||
log.info("请求url:{}",url); | |||
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); | |||
} catch (Exception e) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败"); | |||
@@ -547,7 +548,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
//设置地址(hhz平台) | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 | |||
switch (url){ | |||
switch (platform.getPlatformCode()){ | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.DELETE_TENANT; |
@@ -53,6 +53,9 @@ | |||
<if test="query.name != null and query.name != ''"> | |||
and name LIKE concat('%',#{query.name},'%') | |||
</if> | |||
<if test="query.username != null and query.username != ''"> | |||
and username LIKE concat('%',#{query.username},'%') | |||
</if> | |||
ORDER BY create_time desc | |||
</select> | |||
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> |