jinpengyong
2021-08-04 a740220c647a1bd4dd83f0751e5e1a73fb00226f
screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml
@@ -10,19 +10,9 @@
        <result column="version" property="version"/>
    </resultMap>
    <insert id="insertHistoryHourlyUnAdjust">
        INSERT INTO history_hourly_${timeUnits} VALUES (#{mac}, #{time}, #{value}, #{version})
    <insert id="insertHistoryHourly">
        INSERT INTO history_hourly_${timeUnits}
        VALUES (#{mac}, #{time}, #{value}, #{version})
    </insert>
    <select id="getCountByMacAndTime" resultType="java.lang.Integer">
        SELECT count(1) FROM history_hourly_transition WHERE mac = #{mac} AND `time` = #{time}
    </select>
    <insert id="insertHistoryHourlyTransition">
        INSERT INTO history_hourly_transition (mac, `time`, `value`, version) VALUES (#{mac}, #{time}, #{value}, #{version})
    </insert>
    <update id="updateHistoryTransition">
        UPDATE history_hourly_transition SET update_time = now() WHERE mac = #{mac} AND `time` = {time}
    </update>
</mapper>