From b39a48ee6129905abc581b0dc9c5d4c00ca96df4 Mon Sep 17 00:00:00 2001 From: lizijie <lzjiiie@163.com> Date: Thu, 15 Oct 2020 11:10:16 +0800 Subject: [PATCH] 变更通知邮箱 --- 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..ef5edec 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.json->'$.e12[0]' is not null + and 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> + group by h.time + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0