| | |
| | | </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} |