浏览代码

统计调度

suntianwu 3 年之前
父节点
当前提交
80c3047ec7
共有 1 个文件被更改,包括 45 次插入0 次删除
  1. 45 0
      src/main/java/com/care/bigscreen/schedule/BigScreenSchedule.java

+ 45 - 0
src/main/java/com/care/bigscreen/schedule/BigScreenSchedule.java

@@ -0,0 +1,45 @@
+package com.care.bigscreen.schedule;
+
+
+
+import com.care.bigscreen.mapper.StOrganizationMapper;
+import com.care.bigscreen.mapper.StStationMapper;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+
+/** 大屏统计调度
+ * @author 许明
+ * @version 2.7.0.0 创建于 2018/7/16
+ **/
+@Configuration
+@EnableScheduling
+public class BigScreenSchedule {
+    private static final Logger logger = LogManager.getLogger(BigScreenSchedule.class);
+
+    @Autowired
+    private StOrganizationMapper stOrganizationMapper;
+
+    @Autowired
+    private StStationMapper stStationMapper;
+
+
+    /**
+     * 10 秒钟调用一次
+     */
+    @Scheduled(cron = "0/10 * * * * ?")
+    public void exeStatistics() {
+        try {
+
+        } catch (Exception e) {
+            logger.error("统计计算出错:{}", e.getMessage());
+        }
+    }
+
+
+}