| | |
| | | |
| | | @XxlJob("realWeatherHour") |
| | | public ReturnT insertRealWeather(String param) throws ParseException { |
| | | int count = weatherService.insertRealWeather(); |
| | | if (count > 0) { |
| | | int state = weatherService.insertRealWeather(); |
| | | if (state == 200) { |
| | | return new ReturnT(200, "插入成功"); |
| | | }else { |
| | | return new ReturnT(500, "插入失败"); |
| | | } else { |
| | | return new ReturnT(500, "和风天气接口异常,插入失败,请查看接口"); |
| | | } |
| | | } |
| | | |
| | | @XxlJob("forecastWeatherHour") |
| | | public ReturnT insertForecastWeather(String param) throws ParseException { |
| | | int count = weatherService.insertForecastWeather(); |
| | | if (count > 0) { |
| | | int state = weatherService.insertForecastWeather(); |
| | | if (state == 200) { |
| | | return new ReturnT(200, "插入成功"); |
| | | }else { |
| | | return new ReturnT(500, "插入失败"); |
| | | } else { |
| | | return new ReturnT(500, "和风天气接口异常,插入失败,请查看接口"); |
| | | } |
| | | } |
| | | |
| | | @XxlJob("forecastWeatherHourNew") |
| | | public ReturnT insertForecastWeatherNew(String param) throws ParseException { |
| | | int count = weatherService.insertForecastWeatherNew(); |
| | | if (count > 0) { |
| | | int state = weatherService.insertForecastWeatherNew(); |
| | | if (state == 200) { |
| | | return new ReturnT(200, "插入成功"); |
| | | }else { |
| | | return new ReturnT(500, "插入失败"); |
| | | } else { |
| | | return new ReturnT(500, "和风天气接口异常,插入失败,请查看接口"); |
| | | } |
| | | } |
| | | } |