From 8f636dc2b82cbb77d85332197ec93fe52d174c13 Mon Sep 17 00:00:00 2001 From: ZhuDongming <773644075@qq.com> Date: Tue, 28 Apr 2020 15:28:58 +0800 Subject: [PATCH] update 走航查询表 --- src/main/resources/mapper/HistoryMapper.xml | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/HistoryMapper.xml b/src/main/resources/mapper/HistoryMapper.xml index 7835d14..4bfc446 100644 --- a/src/main/resources/mapper/HistoryMapper.xml +++ b/src/main/resources/mapper/HistoryMapper.xml @@ -216,4 +216,24 @@ AND h.time BETWEEN #{starttime} AND #{endtime} </select> + <!-- ���������sensor������ --> + <select id="getCarSensorData" 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_special 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