yuzixiang
2020-05-25 728bb68f16de54040a56b5e7d7a01e4ed6c49829
src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -10,6 +10,16 @@
            (#{map.mac},#{map.time},#{map.json})
        </foreach>
    </insert>
    <update id="createHistoryMinutelyTable">
    CREATE TABLE  IF NOT EXISTS `history_minutely_${yearAndMonth}` (
        `mac` varchar(20) CHARACTER SET latin1 DEFAULT NULL,
        `time` datetime DEFAULT NULL,
        `json` json DEFAULT NULL,
        KEY `_idx_mac` (`mac`) USING BTREE,
        KEY `_idx_time` (`time`) USING BTREE,
        KEY `_idx_mac_time` (`mac`,`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    </update>
    <select id="getMinutelySensorData" resultType="java.util.LinkedHashMap">
        SELECT