Browse Source

天气接口很坑,要注意

tags/v1.1.0
qiujinyang 2 years ago
parent
commit
420c03f3c4
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/MissionServiceImpl.java

+ 8
- 3
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/MissionServiceImpl.java View File

thMissionUpdate.setMileage(missionStatusRequest.getMileage()); thMissionUpdate.setMileage(missionStatusRequest.getMileage());
boolean result=false; boolean result=false;


AirWeatherVO weather = inspectionService.getWeather(thMission.getAirportId());
String weatherStr = WeatherUtil.getWeather(weather);
thMissionUpdate.setWeather(weatherStr);
try {
AirWeatherVO weather = inspectionService.getWeather(thMission.getAirportId());
String weatherStr = WeatherUtil.getWeather(weather);
thMissionUpdate.setWeather(weatherStr);
}catch (Exception e){
thMissionUpdate.setWeather("");
log.info("获取天气信息失败,请重试");
}


//任务调用完成之后,调用发送通道,请求DSP关闭请求 //任务调用完成之后,调用发送通道,请求DSP关闭请求
//调用DSP接口 //调用DSP接口

Loading…
Cancel
Save