cjl
2023-07-10 3226649df5365fe731d8f66bc768cb8518e42e2e
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>