| <?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.dy.pipIrrGlobal.daoRm.RmAlarmStateLastMapper"> | 
|   <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> | 
|     <!--@mbg.generated--> | 
|     <!--@Table rm_alarm_state_last--> | 
|     <id column="id" jdbcType="BIGINT" property="id" /> | 
|     <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> | 
|     <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> | 
|     <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> | 
|     <result column="dt" jdbcType="TIMESTAMP" property="dt" /> | 
|     <result column="rtuDt" jdbcType="TIMESTAMP" property="rtudt" /> | 
|     <result column="bateryVolt" jdbcType="TINYINT" property="bateryvolt" /> | 
|     <result column="loss" jdbcType="TINYINT" property="loss" /> | 
|     <result column="meter" jdbcType="TINYINT" property="meter" /> | 
|     <result column="valve" jdbcType="TINYINT" property="valve" /> | 
|     <result column="icCard" jdbcType="TINYINT" property="iccard" /> | 
|     <result column="working" jdbcType="TINYINT" property="working" /> | 
|     <result column="valveState" jdbcType="TINYINT" property="valvestate" /> | 
|   </resultMap> | 
|   <sql id="Base_Column_List"> | 
|     <!--@mbg.generated--> | 
|     id, controllerId, intakeId, rtuAddr, dt, rtuDt, bateryVolt, loss, meter, valve, icCard, | 
|     working, valveState | 
|   </sql> | 
|   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|     <!--@mbg.generated--> | 
|     select  | 
|     <include refid="Base_Column_List" /> | 
|     from rm_alarm_state_last | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </select> | 
|   | 
|  <select id="selectByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> | 
|     <!--@mbg.generated--> | 
|     select | 
|     <include refid="Base_Column_List" /> | 
|     from rm_alarm_state_last | 
|     where rtuAddr = #{rtuAddr,jdbcType=VARCHAR} | 
|   </select> | 
|   | 
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|     <!--@mbg.generated--> | 
|     delete from rm_alarm_state_last | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </delete> | 
|   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> | 
|     <!--@mbg.generated--> | 
|     insert into rm_alarm_state_last (id, controllerId, intakeId,  | 
|       rtuAddr, dt, rtuDt, bateryVolt, | 
|       loss, meter, valve,  | 
|       icCard, working, valveState | 
|       ) | 
|     values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT},  | 
|       #{rtuaddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtudt,jdbcType=TIMESTAMP}, #{bateryvolt,jdbcType=TINYINT}, | 
|       #{loss,jdbcType=TINYINT}, #{meter,jdbcType=TINYINT}, #{valve,jdbcType=TINYINT},  | 
|       #{iccard,jdbcType=TINYINT}, #{working,jdbcType=TINYINT}, #{valvestate,jdbcType=TINYINT} | 
|       ) | 
|   </insert> | 
|   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> | 
|     <!--@mbg.generated--> | 
|     insert into rm_alarm_state_last | 
|     <trim prefix="(" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         id, | 
|       </if> | 
|       <if test="controllerid != null"> | 
|         controllerId, | 
|       </if> | 
|       <if test="intakeid != null"> | 
|         intakeId, | 
|       </if> | 
|       <if test="rtuaddr != null"> | 
|         rtuAddr, | 
|       </if> | 
|       <if test="dt != null"> | 
|         dt, | 
|       </if> | 
|       <if test="rtudt != null"> | 
|         rtuDt, | 
|       </if> | 
|       <if test="bateryvolt != null"> | 
|         bateryVolt, | 
|       </if> | 
|       <if test="loss != null"> | 
|         loss, | 
|       </if> | 
|       <if test="meter != null"> | 
|         meter, | 
|       </if> | 
|       <if test="valve != null"> | 
|         valve, | 
|       </if> | 
|       <if test="iccard != null"> | 
|         icCard, | 
|       </if> | 
|       <if test="working != null"> | 
|         working, | 
|       </if> | 
|       <if test="valvestate != null"> | 
|         valveState, | 
|       </if> | 
|     </trim> | 
|     <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         #{id,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="controllerid != null"> | 
|         #{controllerid,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="intakeid != null"> | 
|         #{intakeid,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="rtuaddr != null"> | 
|         #{rtuaddr,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="dt != null"> | 
|         #{dt,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="rtudt != null"> | 
|         #{rtudt,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="bateryvolt != null"> | 
|         #{bateryvolt,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="loss != null"> | 
|         #{loss,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="meter != null"> | 
|         #{meter,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="valve != null"> | 
|         #{valve,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="iccard != null"> | 
|         #{iccard,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="working != null"> | 
|         #{working,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="valvestate != null"> | 
|         #{valvestate,jdbcType=TINYINT}, | 
|       </if> | 
|     </trim> | 
|   </insert> | 
|   <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> | 
|     <!--@mbg.generated--> | 
|     update rm_alarm_state_last | 
|     <set> | 
|       <if test="controllerid != null"> | 
|         controllerId = #{controllerid,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="intakeid != null"> | 
|         intakeId = #{intakeid,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="rtuaddr != null"> | 
|         rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="dt != null"> | 
|         dt = #{dt,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="rtudt != null"> | 
|         rtuDt = #{rtudt,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="bateryvolt != null"> | 
|         bateryVolt = #{bateryvolt,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="loss != null"> | 
|         loss = #{loss,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="meter != null"> | 
|         meter = #{meter,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="valve != null"> | 
|         valve = #{valve,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="iccard != null"> | 
|         icCard = #{iccard,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="working != null"> | 
|         working = #{working,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="valvestate != null"> | 
|         valveState = #{valvestate,jdbcType=TINYINT}, | 
|       </if> | 
|     </set> | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
|   <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> | 
|     <!--@mbg.generated--> | 
|     update rm_alarm_state_last | 
|     set controllerId = #{controllerid,jdbcType=BIGINT}, | 
|       intakeId = #{intakeid,jdbcType=BIGINT}, | 
|       rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, | 
|       dt = #{dt,jdbcType=TIMESTAMP}, | 
|       rtuDt = #{rtudt,jdbcType=TIMESTAMP}, | 
|       bateryVolt = #{bateryvolt,jdbcType=TINYINT}, | 
|       loss = #{loss,jdbcType=TINYINT}, | 
|       meter = #{meter,jdbcType=TINYINT}, | 
|       valve = #{valve,jdbcType=TINYINT}, | 
|       icCard = #{iccard,jdbcType=TINYINT}, | 
|       working = #{working,jdbcType=TINYINT}, | 
|       valveState = #{valvestate,jdbcType=TINYINT} | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
| </mapper> |