| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.moral.api.service.CityAqiDailyService; |
| | | import com.moral.api.service.CityAqiMonthlyService; |
| | | import com.moral.api.service.CityAqiService; |
| | | import com.moral.api.service.CityAqiYearlyService; |
| | | import com.moral.api.service.HistoryAqiService; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.context.XxlJobHelper; |
| | |
| | | |
| | | @Autowired |
| | | private CityAqiService cityAqiService; |
| | | |
| | | @Autowired |
| | | private CityAqiMonthlyService cityAqiMonthlyService; |
| | | |
| | | @Autowired |
| | | private CityAqiYearlyService cityAqiYearlyService; |
| | | |
| | | //国控站aqi小时数据接入 |
| | | @XxlJob("insertHistoryAqi") |
| | |
| | | |
| | | //城市aqi日数据统计 |
| | | @XxlJob("insertCityAqiDaily") |
| | | public ReturnT insertCityAqiDaily(){ |
| | | public ReturnT insertCityAqiDaily() { |
| | | try { |
| | | cityAqiDailyService.insertCityAqiDaily(); |
| | | } catch (Exception e) { |
| | |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | //城市aqi月数据统计 |
| | | @XxlJob("insertCityAqiMonthly") |
| | | public ReturnT insertCityAqiMonthly() { |
| | | try { |
| | | cityAqiMonthlyService.insertCityAqiMonthly(); |
| | | } catch (Exception e) { |
| | | XxlJobHelper.log(e.getMessage()); |
| | | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | //城市aqi年数据统计 |
| | | @XxlJob("insertCityAqiYearly") |
| | | public ReturnT insertCityAqiYearly() { |
| | | try { |
| | | cityAqiYearlyService.insertCityAqiYearly(); |
| | | } catch (Exception e) { |
| | | XxlJobHelper.log(e.getMessage()); |
| | | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |