From 8dc1a393928b0195bf0b5a6d6f8daec6e4a043b1 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Wed, 18 Nov 2020 14:18:12 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/resources/mapper/HistoryHourlyMapper.xml | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/HistoryHourlyMapper.xml b/src/main/resources/mapper/HistoryHourlyMapper.xml index b1896e9..3d5ca95 100644 --- a/src/main/resources/mapper/HistoryHourlyMapper.xml +++ b/src/main/resources/mapper/HistoryHourlyMapper.xml @@ -100,7 +100,12 @@ </select> <select id="getDataByMacAndTime" resultType="java.util.Map"> - SELECT DATE_FORMAT(`time`,'%Y-%m-%d %H:%i:%s') as `time`,json->'$.${sensor}[0]' as ${sensor} FROM `history_hourly` where `mac`=#{mac} and `time`>=#{startTime} and `time`<#{endTime} + SELECT DATE_FORMAT(`time`,'%Y-%m-%d %H:%i:%s') as `time`, + json->'$.${sensor}[0]' as ${sensor} + FROM `history_hourly` + where `mac`=#{mac} + and `time`>=#{startTime} + and `time`<#{endTime} </select> <select id="getDataByMacAndTime1" resultType="java.util.Map"> SELECT DATE_FORMAT(`time`,'%Y-%m-%d %H:%i:%s') as `time`,json->'$.${sensor}[0]' as ${sensor} FROM `history_hourly` where `mac`=#{mac} and `time`>=#{startTime} and `time`<![CDATA[<]]>#{endTime} -- Gitblit v1.8.0