From cb59966a148f601c41e77637be701fda04251d91 Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Tue, 14 Jun 2022 14:14:53 +0800
Subject: [PATCH] 添加需要离线报警程序,分钟数据统计往前移一分钟

---
 src/main/resources/mapper/HistoryHourlyMapper.xml |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/HistoryHourlyMapper.xml b/src/main/resources/mapper/HistoryHourlyMapper.xml
index f9a4473..169573f 100644
--- a/src/main/resources/mapper/HistoryHourlyMapper.xml
+++ b/src/main/resources/mapper/HistoryHourlyMapper.xml
@@ -96,4 +96,18 @@
         group by h.time
     </select>
 
+    <select id="selectCountByMac" resultType="java.lang.Integer">
+        SELECT count(1) FROM history_hourly
+        WHERE mac = #{mac}
+        AND `time` >= #{start}
+        AND `time` <![CDATA[<]]> #{end}
+    </select>
+
+    <select id="selectDataByMac" resultType="java.lang.String">
+        select
+        json
+        from history_hourly
+        where mac = #{mac}
+        and `time` = #{time}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0