<?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.baseinfo.meterbasesystemmessage.mapper.MeterBaseSystemMessageMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasesystemmessage.model.MeterBaseSystemMessage">
    <id column="SYSTEM_MESSAGE_NO" jdbcType="VARCHAR" property="systemMessageNo" />
    <result column="SYSTEM_MESSAGE_NAME" jdbcType="VARCHAR" property="systemMessageName" />
    <result column="SYSTEM_MESSAGE_CONTENT" jdbcType="VARCHAR" property="systemMessageContent" />
    <result column="VAILD_FLAG" jdbcType="VARCHAR" property="vaildFlag" />
    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
    <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="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
    <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
    <result column="IS_READ" jdbcType="VARCHAR" property="isRead" />
  </resultMap>
  <sql id="columns">
    SYSTEM_MESSAGE_NO, SYSTEM_MESSAGE_NAME, SYSTEM_MESSAGE_CONTENT, VAILD_FLAG, MEMO, 
    CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
    DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, IS_READ
  </sql>
  <sql id="columns_alias">
    t.SYSTEM_MESSAGE_NO, t.SYSTEM_MESSAGE_NAME, t.SYSTEM_MESSAGE_CONTENT, t.VAILD_FLAG, 
    t.MEMO, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
    t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.IS_READ
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_BASE_SYSTEM_MESSAGE
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_BASE_SYSTEM_MESSAGE t
  </sql>
  <sql id="where">
    <where> 
      <if test="systemMessageNo != null and systemMessageNo != ''">
        and SYSTEM_MESSAGE_NO = #{systemMessageNo}
      </if>
      <if test="systemMessageName != null and systemMessageName != ''">
        and SYSTEM_MESSAGE_NAME = #{systemMessageName}
      </if>
      <if test="systemMessageContent != null and systemMessageContent != ''">
        and SYSTEM_MESSAGE_CONTENT = #{systemMessageContent}
      </if>
      <if test="vaildFlag != null and vaildFlag != ''">
        and VAILD_FLAG = #{vaildFlag}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO = #{memo}
      </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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="isRead != null and isRead != ''">
        and IS_READ = #{isRead}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="systemMessageNo != null and systemMessageNo != ''">
        and SYSTEM_MESSAGE_NO LIKE '%${systemMessageNo}%'
      </if>
      <if test="systemMessageName != null and systemMessageName != ''">
        and SYSTEM_MESSAGE_NAME LIKE '%${systemMessageName}%'
      </if>
      <if test="systemMessageContent != null and systemMessageContent != ''">
        and SYSTEM_MESSAGE_CONTENT LIKE '%${systemMessageContent}%'
      </if>
      <if test="vaildFlag != null and vaildFlag != ''">
        and VAILD_FLAG LIKE '%${vaildFlag}%'
      </if>
      <if test="memo != null and memo != ''">
        and MEMO LIKE '%${memo}%'
      </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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="isRead != null and isRead != ''">
        and IS_READ LIKE '%${isRead}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_SYSTEM_MESSAGE
    where SYSTEM_MESSAGE_NO = #{systemMessageNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_SYSTEM_MESSAGE
    where 1!=1 
      <if test="systemMessageName != null and systemMessageName != ''">
        or SYSTEM_MESSAGE_NAME = #{systemMessageName}
      </if>
      <if test="systemMessageContent != null and systemMessageContent != ''">
        or SYSTEM_MESSAGE_CONTENT = #{systemMessageContent}
      </if>
      <if test="vaildFlag != null and vaildFlag != ''">
        or VAILD_FLAG = #{vaildFlag}
      </if>
      <if test="memo != null and memo != ''">
        or MEMO = #{memo}
      </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="deleteManNo != null and deleteManNo != ''">
        or DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        or DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
      </if>
      <if test="isRead != null and isRead != ''">
        or IS_READ = #{isRead}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasesystemmessage.model.MeterBaseSystemMessage">
    insert into METER_BASE_SYSTEM_MESSAGE (SYSTEM_MESSAGE_NO, SYSTEM_MESSAGE_NAME, 
      SYSTEM_MESSAGE_CONTENT, VAILD_FLAG, MEMO, 
      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      IS_READ)
    values (#{systemMessageNo,jdbcType=VARCHAR}, #{systemMessageName,jdbcType=VARCHAR}, 
      #{systemMessageContent,jdbcType=VARCHAR}, #{vaildFlag,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, 
      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, 
      #{isRead,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasesystemmessage.model.MeterBaseSystemMessage">
    insert into METER_BASE_SYSTEM_MESSAGE
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="systemMessageNo != null">
        SYSTEM_MESSAGE_NO,
      </if>
      <if test="systemMessageName != null">
        SYSTEM_MESSAGE_NAME,
      </if>
      <if test="systemMessageContent != null">
        SYSTEM_MESSAGE_CONTENT,
      </if>
      <if test="vaildFlag != null">
        VAILD_FLAG,
      </if>
      <if test="memo != null">
        MEMO,
      </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="deleteManNo != null">
        DELETE_MAN_NO,
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME,
      </if>
      <if test="deleteTime != null">
        DELETE_TIME,
      </if>
      <if test="isRead != null">
        IS_READ,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="systemMessageNo != null">
        #{systemMessageNo,jdbcType=VARCHAR},
      </if>
      <if test="systemMessageName != null">
        #{systemMessageName,jdbcType=VARCHAR},
      </if>
      <if test="systemMessageContent != null">
        #{systemMessageContent,jdbcType=VARCHAR},
      </if>
      <if test="vaildFlag != null">
        #{vaildFlag,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </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="deleteManNo != null">
        #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isRead != null">
        #{isRead,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasesystemmessage.model.MeterBaseSystemMessage">
    update METER_BASE_SYSTEM_MESSAGE
    set SYSTEM_MESSAGE_NAME = #{systemMessageName,jdbcType=VARCHAR},
      SYSTEM_MESSAGE_CONTENT = #{systemMessageContent,jdbcType=VARCHAR},
      VAILD_FLAG = #{vaildFlag,jdbcType=VARCHAR},
      MEMO = #{memo,jdbcType=VARCHAR},
      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},
      DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      IS_READ = #{isRead,jdbcType=VARCHAR}
    where SYSTEM_MESSAGE_NO = #{systemMessageNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasesystemmessage.model.MeterBaseSystemMessage">
    update METER_BASE_SYSTEM_MESSAGE
    <set>
      <if test="systemMessageName != null">
        SYSTEM_MESSAGE_NAME = #{systemMessageName,jdbcType=VARCHAR},
      </if>
      <if test="systemMessageContent != null">
        SYSTEM_MESSAGE_CONTENT = #{systemMessageContent,jdbcType=VARCHAR},
      </if>
      <if test="vaildFlag != null">
        VAILD_FLAG = #{vaildFlag,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        MEMO = #{memo,jdbcType=VARCHAR},
      </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="deleteManNo != null">
        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isRead != null">
        IS_READ = #{isRead,jdbcType=VARCHAR},
      </if>
    </set>
    where SYSTEM_MESSAGE_NO = #{systemMessageNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where SYSTEM_MESSAGE_NO = #{systemMessageNo,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_BASE_SYSTEM_MESSAGE 
      (SYSTEM_MESSAGE_NO, 
      SYSTEM_MESSAGE_NAME, SYSTEM_MESSAGE_CONTENT, 
      VAILD_FLAG, MEMO, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      IS_READ)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.systemMessageNo,jdbcType=VARCHAR}, 
      #{item.systemMessageName,jdbcType=VARCHAR}, #{item.systemMessageContent,jdbcType=VARCHAR}, 
      #{item.vaildFlag,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{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.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, 
      #{item.isRead,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_BASE_SYSTEM_MESSAGE
     set
       SYSTEM_MESSAGE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.systemMessageNo,jdbcType=VARCHAR}
       </foreach>
       ,SYSTEM_MESSAGE_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.systemMessageName,jdbcType=VARCHAR}
       </foreach>
       ,SYSTEM_MESSAGE_CONTENT=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.systemMessageContent,jdbcType=VARCHAR}
       </foreach>
       ,VAILD_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.vaildFlag,jdbcType=VARCHAR}
       </foreach>
       ,MEMO=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,DELETE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
       </foreach>
       ,IS_READ=
       <foreach collection="list" item="item" index="index" separator=" " open="case SYSTEM_MESSAGE_NO" close="end">
          when #{item.systemMessageNo,jdbcType=VARCHAR} then #{item.isRead,jdbcType=VARCHAR}
       </foreach>
     where SYSTEM_MESSAGE_NO in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.systemMessageNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_SYSTEM_MESSAGE
    where SYSTEM_MESSAGE_NO in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(SYSTEM_MESSAGE_NO, LENGTH(SYSTEM_MESSAGE_NO) - 4))),0) + 1,5,'0') SYSTEM_MESSAGE_NO
    FROM METER_BASE_SYSTEM_MESSAGE
  </select>

  <update id="updateIsRead" parameterType="java.lang.String">
    update METER_BASE_SYSTEM_MESSAGE set IS_READ = '1' where SYSTEM_MESSAGE_NO = #{systemMessageNo}
  </update>

  <select id="likeDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where> 1 = 1
      <if test="systemMessageNo != null and systemMessageNo != ''">
        and SYSTEM_MESSAGE_NO LIKE '%${systemMessageNo}%'
      </if>
      <if test="systemMessageName != null and systemMessageName != ''">
        and SYSTEM_MESSAGE_NAME LIKE '%${systemMessageName}%'
      </if>
      <if test="systemMessageContent != null and systemMessageContent != ''">
        and SYSTEM_MESSAGE_CONTENT LIKE '%${systemMessageContent}%'
      </if>
      <if test="vaildFlag != null and vaildFlag != ''">
        and VAILD_FLAG LIKE '%${vaildFlag}%'
      </if>
      <if test="memo != null and memo != ''">
        and MEMO LIKE '%${memo}%'
      </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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="isRead != null and isRead != ''">
        and IS_READ LIKE '%${isRead}%'
      </if>
    </where>
    order by create_time desc
  </select>

  <select id="getNews"  resultMap="BaseResultMap">
    <include refid="select"/>
    where valid_flag = 1
    order by create_time desc
  </select>

  <select id="listDesc" resultType="java.util.HashMap" resultMap="BaseResultMap">
    select B.SYSTEM_MESSAGE_NO, B.SYSTEM_MESSAGE_NAME, B.SYSTEM_MESSAGE_CONTENT, B.VAILD_FLAG, B.MEMO,
    B.CREATE_MAN_NO, B.CREATE_MAN_NAME, B.CREATE_TIME, B.UPDATE_MAN_NO, B.UPDATE_MAN_NAME, B.UPDATE_TIME,
    B.DELETE_MAN_NO, B.DELETE_MAN_NAME, B.DELETE_TIME, A.is_read
    from METER_BASE_SYSTEM_MESSAGE B
        left join meter_base_system_news A
            on A.SYSTEM_MESSAGE_NO = B.system_message_no
                and A.car_no = #{carNo}
      where 1 = 1
          and B.VAILD_FLAG = '1'
          and B.SYSTEM_MESSAGE_NO in
          <foreach collection="newList" item="item" separator="," open="(" close=")">
            #{item}
          </foreach>
          <if test="isRead != null and isRead != ''">
            and A.is_Read = #{isRead}
          </if>
    order by B.create_time desc
  </select>
</mapper>