From f6263ece2df35b8fb9d3868a1464397b002bfb1e Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Fri, 11 Sep 2020 13:25:56 +0800
Subject: [PATCH] 邮件发送依赖包更新
---
src/main/resources/mapper/AlarmMapper.xml | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/AlarmMapper.xml b/src/main/resources/mapper/AlarmMapper.xml
index 7a7c6b0..f070bda 100644
--- a/src/main/resources/mapper/AlarmMapper.xml
+++ b/src/main/resources/mapper/AlarmMapper.xml
@@ -3,15 +3,27 @@
<mapper namespace="com.moral.mapper.AlarmMapper">
<select id="getAlarmData" resultType="java.util.LinkedHashMap">
SELECT
- mac
- <foreach collection="sensorKeys" open="," separator="," item="sensorKey">
- json->'$.${sensorKey}[0]' AS '${sensorKey}'
- </foreach>
+ json_search ( json, 'all', '1' ) '1',
+ json_search ( json, 'all', '2' ) '2',
+ json_search ( json, 'all', '3' ) '3'
FROM
alarm_${yearAndMonth}
WHERE
time >= #{start}
AND time <![CDATA[<]]> #{end}
+ AND mac =#{mac}
+ </select>
+
+ <select id="getMacs" resultType="java.lang.String">
+ SELECT
+ mac
+ FROM
+ alarm_${yearAndMonth}
+ where
+ time >= #{start}
+ AND time <![CDATA[<]]> #{end}
+ GROUP BY
+ mac
</select>
<insert id="insertAlarmDaily">
--
Gitblit v1.8.0