From 4428fd50d5e8216d5d7bd63a7fc2e1bb8e239d9d Mon Sep 17 00:00:00 2001 From: ZhuDongming <773644075@qq.com> Date: Wed, 13 May 2020 13:58:13 +0800 Subject: [PATCH] update大屏地图跳转定位问题 --- src/main/resources/mapper/HistoryMapper.xml | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/HistoryMapper.xml b/src/main/resources/mapper/HistoryMapper.xml index 4bfc446..2a7dfb0 100644 --- a/src/main/resources/mapper/HistoryMapper.xml +++ b/src/main/resources/mapper/HistoryMapper.xml @@ -236,4 +236,23 @@ h.time </select> + <select id="listGetSensorData" resultType="java.util.LinkedHashMap"> + SELECT + DATE_FORMAT(h.time,'%Y-%m-%d %H:%i:%s') time, + <foreach collection="sensorKeys" item="sensorKey" separator=","> + h.value->'$.${sensorKey}' as '${sensorKey}' + </foreach> + FROM + history as h + <where> + <if test="mac!=null"> + and h.mac=#{mac} + </if> + and h.time >= #{startTime} + and h.time <![CDATA[<]]> #{endTime} + </where> + ORDER BY + h.time + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0