|
@@ -0,0 +1,32 @@
|
|
|
+package org.jeecg.modules.interlockjob;
|
|
|
+
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.modules.iotedgeCollectData.service.IIotedgeCollectDataService;
|
|
|
+import org.quartz.Job;
|
|
|
+import org.quartz.JobExecutionContext;
|
|
|
+import org.quartz.JobExecutionException;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author dzc
|
|
|
+ * @date 2024/9/29 9:26
|
|
|
+ * @package org.jeecg.modules.interlockjob
|
|
|
+ * @project interlock_server
|
|
|
+ * @des 定时清空采集表中的数据
|
|
|
+ */
|
|
|
+@Component
|
|
|
+@Slf4j
|
|
|
+public class TruncateIotedgeCollectDataJob implements Job {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IIotedgeCollectDataService iotedgeCollectDataService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
+ log.info("开始清空表中存储的IoTEdge采集数据");
|
|
|
+ iotedgeCollectDataService.truncateTable();
|
|
|
+ log.info("清空完成!");
|
|
|
+ }
|
|
|
+}
|