<?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> 
 |