|
|
<?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.monitor.zabbix.mapper.ZabbixHistoryMapper">
|
|
|
<resultMap id="dHistoryInfoMapper" type="com.monitor.zabbix.model.ZabbixDHistoryInfo">
|
|
|
<result column="itemid" property="itemId" jdbcType="INTEGER"/>
|
|
|
<result column="value" property="value" jdbcType="DOUBLE"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="uHistoryInfoMapper" type="com.monitor.zabbix.model.ZabbixUHistoryInfo">
|
|
|
<result column="itemid" property="itemId" jdbcType="INTEGER"/>
|
|
|
<result column="value" property="value" jdbcType="BIGINT"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="queryDHistoryInfo" resultMap="dHistoryInfoMapper">
|
|
|
select
|
|
|
itemid,`value`
|
|
|
from history
|
|
|
where itemid = #{itemId,jdbcType=INTEGER}
|
|
|
order by clock desc limit 1;
|
|
|
</select>
|
|
|
|
|
|
<select id="queryUHistoryInfo" resultMap="uHistoryInfoMapper">
|
|
|
select itemid,`value`
|
|
|
from history_uint
|
|
|
where itemid = #{itemId,jdbcType=INTEGER}
|
|
|
order by clock desc limit 1;
|
|
|
</select>
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |