| | |
| | | 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>
|
| | |
|
| | | <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">
|