jinpengyong
2023-08-31 2b5a2bb0525cc70d7f44d18b8bcf44f46db8a35e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.moral.api.mapper.HistoryHourlyMapper">
 
    <insert id="insertHistoryHourly">
        INSERT INTO history_hourly_${timeUnits}
        VALUES (#{mac}, #{time}, #{value}, #{version})
    </insert>
 
 
    <select id="selectHistoryHourly" resultType="java.util.Map">
        SELECT `value`
        FROM history_hourly_${timeUnits}
        WHERE `time` = #{time}
          and mac = #{mac}
    </select>
 
</mapper>