|
|
|
|
|
|
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
log.info("调用机场平台,获取航线列表:airPortStr={}",airPortStr); |
|
|
log.info("调用机场平台,获取航线列表:airPortStr={}",airPortStr); |
|
|
//string----->JsonResult |
|
|
//string----->JsonResult |
|
|
//JsonResult<AirLineVO> jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
|
|
|
|
|
JsonResult<AirLineVO> jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(Objects.requireNonNull(jsonResult).getData()) && jsonResult.getCode() != 0)) { |
|
|
if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(Objects.requireNonNull(jsonResult).getData()) && jsonResult.getCode() != 0)) { |
|
|
return JsonResult.error(AriportCodeEnum.BAD_REQUEST.getCode(), AriportCodeEnum.BAD_REQUEST.getMsg()); |
|
|
return JsonResult.error(AriportCodeEnum.BAD_REQUEST.getCode(), AriportCodeEnum.BAD_REQUEST.getMsg()); |