wwh пре 1 месец
родитељ
комит
3ccf7b9c3b

+ 1 - 1
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/service/IotDataIncrementalSyncService.java

@@ -21,7 +21,7 @@ import com.ruoyi.web.modules.industryservice.support.IotSyncSupport.SyncQuery;
21
 /**
21
 /**
22
  * IoT 数据同步编排服务。
22
  * IoT 数据同步编排服务。
23
  * <p>
23
  * <p>
24
- * 每日 11:15 由 {@link com.ruoyi.web.modules.industryservice.task.IotDataIncrementalSyncTask} 触发。
24
+ * 每日凌晨 1:00 由 {@link com.ruoyi.web.modules.industryservice.task.IotDataIncrementalSyncTask} 触发。
25
  * </p>
25
  * </p>
26
  *
26
  *
27
  * <h3>全量 / 增量策略(按表独立判断)</h3>
27
  * <h3>全量 / 增量策略(按表独立判断)</h3>

+ 1 - 1
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/task/IotDataIncrementalSyncTask.java

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
11
 /**
11
 /**
12
  * IoT 数据增量同步定时任务(Quartz 调用:{@code iotDataIncrementalSyncTask.syncIncremental})。
12
  * IoT 数据增量同步定时任务(Quartz 调用:{@code iotDataIncrementalSyncTask.syncIncremental})。
13
  * <p>
13
  * <p>
14
- * 建议 cron:{@code 0 15 11 * * ?}(每天 11:15)。
14
+ * 建议 cron:{@code 0 0 1 * * ?}(每天凌晨 1:00)。
15
  * 同步牛只称重、定位项圈、环境监测三类数据。
15
  * 同步牛只称重、定位项圈、环境监测三类数据。
16
  * </p>
16
  * </p>
17
  */
17
  */

+ 1 - 1
baqing-admin/src/main/resources/mapper/industryservice/BizEnvMonitoringRecordMapper.xml

@@ -34,7 +34,7 @@
34
     </select>
34
     </select>
35
 
35
 
36
     <select id="selectMaxMonitoringTime" resultType="java.util.Date">
36
     <select id="selectMaxMonitoringTime" resultType="java.util.Date">
37
-        select max(monitoring_time) from biz_env_monitoring_record where del_flag = '0'
37
+        select max(monitoring_time) from biz_env_monitoring_record
38
     </select>
38
     </select>
39
 
39
 
40
     <select id="countRecords" resultType="long">
40
     <select id="countRecords" resultType="long">

+ 1 - 1
baqing-admin/src/main/resources/mapper/industryservice/BizYakCollarLocationMapper.xml

@@ -28,7 +28,7 @@
28
     </select>
28
     </select>
29
 
29
 
30
     <select id="selectMaxReportTime" resultType="java.util.Date">
30
     <select id="selectMaxReportTime" resultType="java.util.Date">
31
-        select max(report_time) from biz_yak_collar_location where del_flag = '0'
31
+        select max(report_time) from biz_yak_collar_location
32
     </select>
32
     </select>
33
 
33
 
34
     <select id="countRecords" resultType="long">
34
     <select id="countRecords" resultType="long">

+ 1 - 1
baqing-admin/src/main/resources/mapper/industryservice/BizYakWeighingRecordMapper.xml

@@ -34,7 +34,7 @@
34
     </select>
34
     </select>
35
 
35
 
36
     <select id="selectMaxWeighingTime" resultType="java.util.Date">
36
     <select id="selectMaxWeighingTime" resultType="java.util.Date">
37
-        select max(weighing_time) from biz_yak_weighing_record where del_flag = '0'
37
+        select max(weighing_time) from biz_yak_weighing_record
38
     </select>
38
     </select>
39
 
39
 
40
     <select id="countRecords" resultType="long">
40
     <select id="countRecords" resultType="long">

+ 2 - 1
sql/biz_sys_job_iot_data_incremental_sync.sql

@@ -1,4 +1,4 @@
1
+-- IoT 数据每日凌晨 1:00 增量同步(需在「系统管理-定时任务」中启用)
1
 -- 调用目标:iotDataIncrementalSyncTask.syncIncremental
2
 -- 调用目标:iotDataIncrementalSyncTask.syncIncremental
2
 -- 若 job_id 冲突请调整主键后执行
3
 -- 若 job_id 冲突请调整主键后执行
3
 
4
 
@@ -10,7 +10,7 @@ INSERT INTO sys_job (
10
     'IoT数据每日增量同步',
10
     'IoT数据每日增量同步',
11
     'DEFAULT',
11
     'DEFAULT',
12
     'iotDataIncrementalSyncTask.syncIncremental',
12
     'iotDataIncrementalSyncTask.syncIncremental',
13
-    '0 15 11 * * ?',
13
+    '0 0 1 * * ?',
14
     '3',
14
     '3',
15
     '1',
15
     '1',
16
     '0',
16
     '0',