<?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.steerinfo.meterwork.meterworkzeroalarm.mapper.MeterWorkZeroAlarmMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkzeroalarm.model.MeterWorkZeroAlarm">
    <id column="ALARM_NO" jdbcType="VARCHAR" property="alarmNo" />
    <result column="SPOT_TYPE_NO" jdbcType="VARCHAR" property="spotTypeNo" />
    <result column="SPOT_TYPE_NAME" jdbcType="VARCHAR" property="spotTypeName" />
    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
    <result column="SCALE_POINT_NO" jdbcType="VARCHAR" property="scalePointNo" />
    <result column="SCALE_POINT_NAME" jdbcType="VARCHAR" property="scalePointName" />
    <result column="ZERO_WEIGHT" jdbcType="DECIMAL" property="zeroWeight" />
    <result column="ZERO_TIME" jdbcType="TIMESTAMP" property="zeroTime" />
    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
  </resultMap>
  <sql id="columns">
    ALARM_NO, SPOT_TYPE_NO, SPOT_TYPE_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, SCALE_POINT_NO,
    SCALE_POINT_NAME, ZERO_WEIGHT, ZERO_TIME, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, MEMO, VALID_FLAG
  </sql>
  <sql id="columns_alias">
    t.ALARM_NO, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SCALE_POINT_NO,
    t.SCALE_POINT_NAME, t.ZERO_WEIGHT, t.ZERO_TIME, t.CREATE_MAN_NO, t.CREATE_MAN_NAME,
    t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.MEMO, t.VALID_FLAG
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_WORK_ZERO_ALARM
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_WORK_ZERO_ALARM t
  </sql>
  <sql id="where">
    <where>
      <if test="alarmNo != null and alarmNo != ''">
        and ALARM_NO = #{alarmNo}
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        and SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        and SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO = #{baseSpotNo}
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="scalePointNo != null and scalePointNo != ''">
        and SCALE_POINT_NO = #{scalePointNo}
      </if>
      <if test="scalePointName != null and scalePointName != ''">
        and SCALE_POINT_NAME = #{scalePointName}
      </if>
      <if test="zeroWeight != null">
        and ZERO_WEIGHT = #{zeroWeight}
      </if>
      <if test="zeroTime != null">
        and TO_CHAR(ZERO_TIME,'yyyy-MM-dd') = #{zeroTime}
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO = #{createManNo}
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO = #{updateManNo}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO = #{memo}
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG = #{validFlag}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where>
      <if test="alarmNo != null and alarmNo != ''">
        and ALARM_NO LIKE '%${alarmNo}%'
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        and SPOT_TYPE_NO LIKE '%${spotTypeNo}%'
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        and SPOT_TYPE_NAME LIKE '%${spotTypeName}%'
      </if>
      <if test="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
      </if>
      <if test="scalePointNo != null and scalePointNo != ''">
        and SCALE_POINT_NO LIKE '%${scalePointNo}%'
      </if>
      <if test="scalePointName != null and scalePointName != ''">
        and SCALE_POINT_NAME LIKE '%${scalePointName}%'
      </if>
      <if test="zeroWeight != null">
        and ZERO_WEIGHT = #{zeroWeight}
      </if>
      <if test="zeroTime != null">
        and TO_CHAR(ZERO_TIME,'yyyy-MM-dd') = #{zeroTime}
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO LIKE '%${createManNo}%'
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME LIKE '%${createManName}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO LIKE '%${memo}%'
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG LIKE '%${validFlag}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_WORK_ZERO_ALARM
    where ALARM_NO = #{alarmNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_WORK_ZERO_ALARM
    where 1!=1
    <if test="spotTypeNo != null and spotTypeNo != ''">
      or SPOT_TYPE_NO = #{spotTypeNo}
    </if>
    <if test="spotTypeName != null and spotTypeName != ''">
      or SPOT_TYPE_NAME = #{spotTypeName}
    </if>
    <if test="baseSpotNo != null and baseSpotNo != ''">
      or BASE_SPOT_NO = #{baseSpotNo}
    </if>
    <if test="baseSpotName != null and baseSpotName != ''">
      or BASE_SPOT_NAME = #{baseSpotName}
    </if>
    <if test="scalePointNo != null and scalePointNo != ''">
      or SCALE_POINT_NO = #{scalePointNo}
    </if>
    <if test="scalePointName != null and scalePointName != ''">
      or SCALE_POINT_NAME = #{scalePointName}
    </if>
    <if test="zeroWeight != null">
      or ZERO_WEIGHT = #{zeroWeight}
    </if>
    <if test="zeroTime != null">
      or TO_CHAR(ZERO_TIME,'yyyy-MM-dd') = '#{zeroTime}'
    </if>
    <if test="createManNo != null and createManNo != ''">
      or CREATE_MAN_NO = #{createManNo}
    </if>
    <if test="createManName != null and createManName != ''">
      or CREATE_MAN_NAME = #{createManName}
    </if>
    <if test="createTime != null">
      or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
    </if>
    <if test="updateManNo != null and updateManNo != ''">
      or UPDATE_MAN_NO = #{updateManNo}
    </if>
    <if test="updateManName != null and updateManName != ''">
      or UPDATE_MAN_NAME = #{updateManName}
    </if>
    <if test="updateTime != null">
      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
    </if>
    <if test="memo != null and memo != ''">
      or MEMO = #{memo}
    </if>
    <if test="validFlag != null and validFlag != ''">
      or VALID_FLAG = #{validFlag}
    </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkzeroalarm.model.MeterWorkZeroAlarm">
    insert into METER_WORK_ZERO_ALARM (ALARM_NO, SPOT_TYPE_NO, SPOT_TYPE_NAME,
                                       BASE_SPOT_NO, BASE_SPOT_NAME, SCALE_POINT_NO,
                                       SCALE_POINT_NAME, ZERO_WEIGHT, ZERO_TIME,
                                       CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
                                       UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
                                       MEMO, VALID_FLAG)
    values (#{alarmNo,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR}, #{spotTypeName,jdbcType=VARCHAR},
            #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{scalePointNo,jdbcType=VARCHAR},
            #{scalePointName,jdbcType=VARCHAR}, #{zeroWeight,jdbcType=DECIMAL}, #{zeroTime,jdbcType=TIMESTAMP},
            #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
            #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
            #{memo,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkzeroalarm.model.MeterWorkZeroAlarm">
    insert into METER_WORK_ZERO_ALARM
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="alarmNo != null">
        ALARM_NO,
      </if>
      <if test="spotTypeNo != null">
        SPOT_TYPE_NO,
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME,
      </if>
      <if test="baseSpotNo != null">
        BASE_SPOT_NO,
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME,
      </if>
      <if test="scalePointNo != null">
        SCALE_POINT_NO,
      </if>
      <if test="scalePointName != null">
        SCALE_POINT_NAME,
      </if>
      <if test="zeroWeight != null">
        ZERO_WEIGHT,
      </if>
      <if test="zeroTime != null">
        ZERO_TIME,
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO,
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO,
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="memo != null">
        MEMO,
      </if>
      <if test="validFlag != null">
        VALID_FLAG,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="alarmNo != null">
        #{alarmNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeNo != null">
        #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo != null">
        #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="scalePointNo != null">
        #{scalePointNo,jdbcType=VARCHAR},
      </if>
      <if test="scalePointName != null">
        #{scalePointName,jdbcType=VARCHAR},
      </if>
      <if test="zeroWeight != null">
        #{zeroWeight,jdbcType=DECIMAL},
      </if>
      <if test="zeroTime != null">
        #{zeroTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createManNo != null">
        #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        #{validFlag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkzeroalarm.model.MeterWorkZeroAlarm">
    update METER_WORK_ZERO_ALARM
    set SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
        SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
        SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR},
        SCALE_POINT_NAME = #{scalePointName,jdbcType=VARCHAR},
        ZERO_WEIGHT = #{zeroWeight,jdbcType=DECIMAL},
        ZERO_TIME = #{zeroTime,jdbcType=TIMESTAMP},
        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
        MEMO = #{memo,jdbcType=VARCHAR},
        VALID_FLAG = #{validFlag,jdbcType=VARCHAR}
    where ALARM_NO = #{alarmNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkzeroalarm.model.MeterWorkZeroAlarm">
    update METER_WORK_ZERO_ALARM
    <set>
      <if test="spotTypeNo != null">
        SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo != null">
        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="scalePointNo != null">
        SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR},
      </if>
      <if test="scalePointName != null">
        SCALE_POINT_NAME = #{scalePointName,jdbcType=VARCHAR},
      </if>
      <if test="zeroWeight != null">
        ZERO_WEIGHT = #{zeroWeight,jdbcType=DECIMAL},
      </if>
      <if test="zeroTime != null">
        ZERO_TIME = #{zeroTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null">
        MEMO = #{memo,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      </if>
    </set>
    where ALARM_NO = #{alarmNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where ALARM_NO = #{alarmNo,jdbcType=VARCHAR}
  </select>
  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="where"/>
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLike"/>
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into METER_WORK_ZERO_ALARM
    (ALARM_NO,
    SPOT_TYPE_NO, SPOT_TYPE_NAME, BASE_SPOT_NO,
    BASE_SPOT_NAME, SCALE_POINT_NO, SCALE_POINT_NAME,
    ZERO_WEIGHT, ZERO_TIME, CREATE_MAN_NO,
    CREATE_MAN_NAME, CREATE_TIME,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
    MEMO, VALID_FLAG)
    ( <foreach collection="list" item="item" separator="union all">
    select
    #{item.alarmNo,jdbcType=VARCHAR},
    #{item.spotTypeNo,jdbcType=VARCHAR}, #{item.spotTypeName,jdbcType=VARCHAR}, #{item.baseSpotNo,jdbcType=VARCHAR},
    #{item.baseSpotName,jdbcType=VARCHAR}, #{item.scalePointNo,jdbcType=VARCHAR}, #{item.scalePointName,jdbcType=VARCHAR},
    #{item.zeroWeight,jdbcType=DECIMAL}, #{item.zeroTime,jdbcType=TIMESTAMP}, #{item.createManNo,jdbcType=VARCHAR},
    #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
    #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
    #{item.memo,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR} from dual
  </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
    update METER_WORK_ZERO_ALARM
    set
    ALARM_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.alarmNo,jdbcType=VARCHAR}
    </foreach>
    ,SPOT_TYPE_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
    </foreach>
    ,SPOT_TYPE_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
    </foreach>
    ,BASE_SPOT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
    </foreach>
    ,BASE_SPOT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
    </foreach>
    ,SCALE_POINT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.scalePointNo,jdbcType=VARCHAR}
    </foreach>
    ,SCALE_POINT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.scalePointName,jdbcType=VARCHAR}
    </foreach>
    ,ZERO_WEIGHT=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.zeroWeight,jdbcType=DECIMAL}
    </foreach>
    ,ZERO_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.zeroTime,jdbcType=TIMESTAMP}
    </foreach>
    ,CREATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
    </foreach>
    ,UPDATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
    </foreach>
    ,MEMO=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
    </foreach>
    ,VALID_FLAG=
    <foreach collection="list" item="item" index="index" separator=" " open="case ALARM_NO" close="end">
      when #{item.alarmNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
    </foreach>
    where ALARM_NO in
    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
      #{item.alarmNo,jdbcType=VARCHAR}
    </foreach>
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_WORK_ZERO_ALARM
    where ALARM_NO in
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->

</mapper>