jinpengyong
2021-07-01 28670b2f0240a33c982818462d4e716fac0c45c2
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;
    }
}