From 267c20d552dbce24bce0a0d59a106f49f879ab62 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Wed, 03 Nov 2021 15:33:27 +0800
Subject: [PATCH] city_aqi,city_aqi_daily 6参转大写
---
screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 50 insertions(+), 10 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..79bcfe9 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,11 @@
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.HistoryHourlyService;
+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 +16,19 @@
public class HistoryTableInsertTask {
@Autowired
+ private HistoryFiveMinutelyService historyFiveMinutelyService;
+
+ @Autowired
+ private HistoryHourlyService historyHourlyService;
+
+ @Autowired
private HistoryDailyService historyDailyService;
@Autowired
- private HistoryFiveMinutelyService historyFiveMinutelyService;
+ private HistoryWeeklyService historyWeeklyService;
+
+ @Autowired
+ private HistoryMonthlyService historyMonthlyService;
//5������������������
@XxlJob("insertHistoryFiveMinutely")
@@ -33,7 +37,7 @@
historyFiveMinutelyService.insertHistoryFiveMinutely();
} catch (Exception e) {
XxlJobHelper.log(e.getMessage());
- return ReturnT.FAIL;
+ return new ReturnT(ReturnT.FAIL_CODE, e.getMessage());
}
return ReturnT.SUCCESS;
}
@@ -49,4 +53,40 @@
}
return ReturnT.SUCCESS;
}
+
+ //���������������
+ @XxlJob("insertHistoryWeekly")
+ public ReturnT insertHistoryWeekly() {
+ try {
+ historyWeeklyService.insertHistoryWeekly();
+ } catch (Exception e) {
+ XxlJobHelper.log(e.getMessage());
+ return new ReturnT(ReturnT.FAIL_CODE, e.getMessage());
+ }
+ return ReturnT.SUCCESS;
+ }
+
+ //���������������
+ @XxlJob("insertHistoryMonthly")
+ public ReturnT insertHistoryMonthly() {
+ try {
+ historyMonthlyService.insertHistoryMonthly();
+ } catch (Exception e) {
+ XxlJobHelper.log(e.getMessage());
+ return new ReturnT(ReturnT.FAIL_CODE, e.getMessage());
+ }
+ return ReturnT.SUCCESS;
+ }
+
+ //������������������������
+ @XxlJob("historyHourlySupplement")
+ public ReturnT historyHourlySupplement() {
+ try {
+ historyHourlyService.insertHistoryHourly();
+ } catch (Exception e) {
+ XxlJobHelper.log(e.getMessage());
+ return new ReturnT(ReturnT.FAIL_CODE, e.getMessage());
+ }
+ return ReturnT.SUCCESS;
+ }
}
--
Gitblit v1.8.0