|
|
|
|
|
|
|
|
//这边需要配置到yml文件里面 |
|
|
//这边需要配置到yml文件里面 |
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
String url = tenant.getAirportUrl() +"/api/airportInterface/airportList"; |
|
|
String url = tenant.getAirportUrl() +"/api/airportInterface/airportList"; |
|
|
String param = "page=1&limit=1000&tenantName=" + URLEncoder.encode(tenant.getName(), "UTF-8"); |
|
|
|
|
|
|
|
|
String param = "page=1&limit=1000&tenantCode=" + URLEncoder.encode(tenant.getCode(), "UTF-8"); |
|
|
|
|
|
log.info("****** airportList param tenantCode:{}", tenant.getCode()); |
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
if(ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(jsonResult.getData()) &&jsonResult.getCode() != 0)) { |
|
|
if(ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(jsonResult.getData()) &&jsonResult.getCode() != 0)) { |
|
|
|
|
|
|
|
|
String url = tenant.getAirportUrl() + "/api/airportInterface/executeTask"; |
|
|
String url = tenant.getAirportUrl() + "/api/airportInterface/executeTask"; |
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
jsonObject.put("code", "lc"); |
|
|
jsonObject.put("code", "lc"); |
|
|
jsonObject.put("tenantName", tenant.getName()); |
|
|
|
|
|
|
|
|
jsonObject.put("tenantCode", tenant.getCode()); |
|
|
jsonObject.put("taskId", taskId); |
|
|
jsonObject.put("taskId", taskId); |
|
|
jsonObject.put("requestId", String.valueOf(thMission.getId())); |
|
|
jsonObject.put("requestId", String.valueOf(thMission.getId())); |
|
|
log.info("***** executeTask url:{};param:{}", url, jsonObject.toJSONString()); |
|
|
log.info("***** executeTask url:{};param:{}", url, jsonObject.toJSONString()); |