From 2e93dd3cef6779661fe5b180c23eaf23d37d6775 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Thu, 27 Aug 2020 11:34:43 +0800
Subject: [PATCH] update
---
src/main/resources/mapper/HistoryHourlyMapper.xml | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/HistoryHourlyMapper.xml b/src/main/resources/mapper/HistoryHourlyMapper.xml
index d380d68..cf4fc42 100644
--- a/src/main/resources/mapper/HistoryHourlyMapper.xml
+++ b/src/main/resources/mapper/HistoryHourlyMapper.xml
@@ -63,4 +63,21 @@
</foreach>
</insert>
+ <select id="getBeamByMacs" resultType="java.util.Map">
+ SELECT
+ DATE_FORMAT(h.time,#{typeFormat}) time,
+ avg(h.json->'$.e12[0]') 'beam'
+ FROM history_hourly h
+ WHERE h.mac in
+ <foreach collection="macs" open="(" separator="," close=")" item="mac">
+ #{mac}
+ </foreach>
+ and h.time in
+ <foreach collection="times" open="(" separator="," close=")" item="time">
+ #{time}
+ </foreach>
+ and h.json->'$.e12[0]' is not null
+ group by h.time
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0