jinpengyong
2021-07-02 f5765e4ff4ea188e8a6ba4d66f3c4e7fc2268fdd
screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java
@@ -5,6 +5,7 @@
import com.moral.api.service.HistoryDailyService;
import com.moral.api.service.HistoryFiveMinutelyService;
import com.moral.api.service.HistoryMonthlyService;
import com.moral.api.service.HistoryWeeklyService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
@@ -21,6 +22,9 @@
    @Autowired
    private HistoryWeeklyService historyWeeklyService;
    @Autowired
    private HistoryMonthlyService historyMonthlyService;
    //5分钟数据统计
    @XxlJob("insertHistoryFiveMinutely")
@@ -57,4 +61,16 @@
        }
        return ReturnT.SUCCESS;
    }
    //月数据统计
    @XxlJob("insertHistoryMonthly")
    public ReturnT insertHistoryMonthly() {
        try {
            historyMonthlyService.insertHistoryMonthly();
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
            return ReturnT.FAIL;
        }
        return ReturnT.SUCCESS;
    }
}