cjl
10 hours ago bcc076d63c5c2ff473adb5ac15ea242559086000
screen-job/src/main/java/com/moral/api/task/WeatherTask.java
@@ -1,5 +1,6 @@
package com.moral.api.task;
import com.moral.api.service.RadarHourlySummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -18,6 +19,9 @@
    @Autowired
    private CityWeatherForecastService cityWeatherForecastService;
    @Autowired
    private RadarHourlySummaryService hourlySummaryService;
    //城市逐小时气象实测数据insert
    @XxlJob("insertCityWeather")
    public ReturnT insertCityWeather() {
@@ -41,4 +45,15 @@
        }
        return ReturnT.SUCCESS;
    }
    @XxlJob("processLastHour")
    public ReturnT processLastHour() {
        try {
            hourlySummaryService.processLastHour();
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
            return new ReturnT(ReturnT.FAIL_CODE, e.getMessage());
        }
        return ReturnT.SUCCESS;
    }
}