src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -10,6 +10,16 @@
            (#{map.mac},#{map.time},#{map.json})
        </foreach>
    </insert>
    <update id="createHistoryMinutelyTable">
    CREATE TABLE `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