lizijie
2020-12-02 842148f960e3d5dc995c49ef42a6ce2b8f1d4e34
src/main/resources/mapper/HistoryFiveMinutelyMapper.xml
@@ -9,4 +9,15 @@
            #{mac}
        </foreach>
    </select>
    <select id="getFiveMinutesDataByMac" resultType="java.util.LinkedHashMap">
        select
        <foreach collection="sensorKeys" separator="," item="sensorKey">
          json->'$.${sensorKey}' AS '${sensorKey}'
        </foreach>
        FROM
        history_five_minutely_${yearAndMonth} h
        where  h.time = #{time}
        and h.mac = #{mac}
    </select>
</mapper>