From f8c2609bca86f6e4a2acd2e92a7eae29b86c2070 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Wed, 14 Jul 2021 14:05:42 +0800 Subject: [PATCH] screen-api 添加从kafka取出时间戳 --- screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java b/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java index fcc205c..8a272b3 100644 --- a/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java +++ b/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java @@ -3,16 +3,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson.JSON; -import com.moral.api.entity.HistoryDaily; 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; import com.xxl.job.core.handler.annotation.XxlJob; @@ -21,10 +15,16 @@ public class HistoryTableInsertTask { @Autowired + private HistoryFiveMinutelyService historyFiveMinutelyService; + + @Autowired private HistoryDailyService historyDailyService; @Autowired - private HistoryFiveMinutelyService historyFiveMinutelyService; + private HistoryWeeklyService historyWeeklyService; + + @Autowired + private HistoryMonthlyService historyMonthlyService; //5������������������ @XxlJob("insertHistoryFiveMinutely") @@ -49,4 +49,28 @@ } return ReturnT.SUCCESS; } + + //��������������� + @XxlJob("insertHistoryWeekly") + public ReturnT insertHistoryWeekly() { + try { + historyWeeklyService.insertHistoryWeekly(); + } catch (Exception e) { + XxlJobHelper.log(e.getMessage()); + return ReturnT.FAIL; + } + return ReturnT.SUCCESS; + } + + //��������������� + @XxlJob("insertHistoryMonthly") + public ReturnT insertHistoryMonthly() { + try { + historyMonthlyService.insertHistoryMonthly(); + } catch (Exception e) { + XxlJobHelper.log(e.getMessage()); + return ReturnT.FAIL; + } + return ReturnT.SUCCESS; + } } -- Gitblit v1.8.0