|
|
@ -39,11 +39,8 @@ public class CityGridApiImpl implements CityGridApi { |
|
|
|
response = HttpRequest.post(httpUrl).body(data) |
|
|
|
.header("lan", "zh") |
|
|
|
.header("Content-type", "application/json").execute(); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
LOGGER.error(interFaceName + "信息异常:" + e.getMessage()); |
|
|
|
} |
|
|
|
LOGGER.info(interFaceName + "返回数据:" + response.body()); |
|
|
|
|
|
|
|
JSONObject res = JSONObject.parseObject(response.body()); |
|
|
|
SendEventResultDto result = null; |
|
|
|
if (0 == Integer.parseInt(res.get("code").toString())) { |
|
|
@ -62,7 +59,13 @@ public class CityGridApiImpl implements CityGridApi { |
|
|
|
// LOGGER.error(interFaceName + "返回结果处理错误:" + e.getMessage());
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
LOGGER.error(interFaceName + "信息异常:" + e.getMessage()); |
|
|
|
SendEventResultDto dto = new SendEventResultDto(); |
|
|
|
dto.setCode("-1"); |
|
|
|
dto.setMessage(null == response?"调用接口失败":response.body()); |
|
|
|
return JSONObject.toJSONString(dto); |
|
|
|
} |
|
|
|
return response.body(); |
|
|
|
} |
|
|
|
|
|
|
|