From e745dd38c5a413eaa000c7c5434621fbcd1800d5 Mon Sep 17 00:00:00 2001
From: 于紫祥_1901 <email@yuzixiang_1910>
Date: Wed, 23 Dec 2020 13:55:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/src/main/resources/mapper/HistoryFiveMinutelyMapper.xml b/src/main/resources/mapper/HistoryFiveMinutelyMapper.xml
index 642d314..1c6c1fb 100644
--- a/src/main/resources/mapper/HistoryFiveMinutelyMapper.xml
+++ b/src/main/resources/mapper/HistoryFiveMinutelyMapper.xml
@@ -32,4 +32,19 @@
             #{mac}
         </foreach>
     </select>
+
+    <select id="getFiveMinutesDataByMacsAndTimeSolt" resultType="map">
+        select h.mac,h.time,
+        <foreach collection="sensorKeys" separator="," item="sensorKey">
+            json->'$.${sensorKey}' AS '${sensorKey}'
+        </foreach>
+        FROM history_five_minutely_${yearAndMonth} h
+        WHERE mac IN
+        <foreach collection="macs" separator="," open="(" close=")" item="mac">
+            #{mac}
+        </foreach>
+        AND time BETWEEN #{startTime} AND #{endTime}
+        ORDER BY h.time DESC
+        LIMIT #{macNumber}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0