/** | /** | ||||
* 创建租户 | * 创建租户 | ||||
*/ | */ | ||||
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"; | |||||
} | } |
/** | /** | ||||
* 创建租户 | * 创建租户 | ||||
*/ | */ | ||||
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"; | |||||
* 租户名称 | * 租户名称 | ||||
*/ | */ | ||||
private String name; | private String name; | ||||
/** | |||||
* 租户账号 | |||||
*/ | |||||
private String username; | |||||
} | } |
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; |
<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"> |