From 717c617f8f79387ac08c29a24647ea1f4be6a7b9 Mon Sep 17 00:00:00 2001 From: ZhuDongming <773644075@qq.com> Date: Thu, 30 Apr 2020 08:42:29 +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