<?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.appversionmsg.mapper.AppVersionMsgMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
    <id column="VERSION_ID" jdbcType="VARCHAR" property="versionId" />
    <result column="TEANT_ID" jdbcType="VARCHAR" property="teantId" />
    <result column="PROGRAM_ID" jdbcType="VARCHAR" property="programId" />
    <result column="PROGRAM_NAME" jdbcType="VARCHAR" property="programName" />
    <result column="VERSION_NUM" jdbcType="VARCHAR" property="versionNum" />
    <result column="PROGRAM_TYPE" jdbcType="VARCHAR" property="programType" />
    <result column="VERSION_UPDATE_CONTENT" jdbcType="VARCHAR" property="versionUpdateContent" />
    <result column="PUBLISH_DATE" jdbcType="TIMESTAMP" property="publishDate" />
    <result column="PUBLISH_USER_ID" jdbcType="VARCHAR" property="publishUserId" />
    <result column="PUBLISH_USER_NAME" jdbcType="VARCHAR" property="publishUserName" />
    <result column="PUBLISH_IP" jdbcType="VARCHAR" property="publishIp" />
    <result column="PUBLISH_TO_URL" jdbcType="VARCHAR" property="publishToUrl" />
    <result column="DOWNLOAD_FROM_URL" jdbcType="VARCHAR" property="downloadFromUrl" />
    <result column="IS_MUST_DOWNLOAD_TAG" jdbcType="VARCHAR" property="isMustDownloadTag" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
    <result column="CREATE_ID" jdbcType="VARCHAR" property="createId" />
    <result column="CREATE_NAME" jdbcType="VARCHAR" property="createName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_ID" jdbcType="VARCHAR" property="updateId" />
    <result column="UPDATE_NAME" jdbcType="VARCHAR" property="updateName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <sql id="columns">
    VERSION_ID, TEANT_ID, PROGRAM_ID, PROGRAM_NAME, VERSION_NUM, PROGRAM_TYPE, VERSION_UPDATE_CONTENT, 
    PUBLISH_DATE, PUBLISH_USER_ID, PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, DOWNLOAD_FROM_URL, 
    IS_MUST_DOWNLOAD_TAG, REMARK, VALUE_FLAG, CREATE_ID, CREATE_NAME, CREATE_TIME, UPDATE_ID, 
    UPDATE_NAME, UPDATE_TIME
  </sql>
  <sql id="columns_alias">
    t.VERSION_ID, t.TEANT_ID, t.PROGRAM_ID, t.PROGRAM_NAME, t.VERSION_NUM, t.PROGRAM_TYPE, 
    t.VERSION_UPDATE_CONTENT, t.PUBLISH_DATE, t.PUBLISH_USER_ID, t.PUBLISH_USER_NAME, 
    t.PUBLISH_IP, t.PUBLISH_TO_URL, t.DOWNLOAD_FROM_URL, t.IS_MUST_DOWNLOAD_TAG, t.REMARK, 
    t.VALUE_FLAG, t.CREATE_ID, t.CREATE_NAME, t.CREATE_TIME, t.UPDATE_ID, t.UPDATE_NAME, 
    t.UPDATE_TIME
  </sql>
  <sql id="select">
    SELECT <include refid="columns" /> FROM APP_VERSION_MSG
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias" /> FROM APP_VERSION_MSG t
  </sql>
  <sql id="where">
    <where> 
      <if test="versionId != null and versionId != ''">
        and VERSION_ID = #{versionId}
      </if>
      <if test="teantId != null and teantId != ''">
        and TEANT_ID = #{teantId}
      </if>
      <if test="programId != null and programId != ''">
        and PROGRAM_ID = #{programId}
      </if>
      <if test="programName != null and programName != ''">
        and PROGRAM_NAME = #{programName}
      </if>
      <if test="versionNum != null and versionNum != ''">
        and VERSION_NUM = #{versionNum}
      </if>
      <if test="programType != null and programType != ''">
        and PROGRAM_TYPE = #{programType}
      </if>
      <if test="versionUpdateContent != null and versionUpdateContent != ''">
        and VERSION_UPDATE_CONTENT = #{versionUpdateContent}
      </if>
      <if test="publishDate != null">
        and TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = #{publishDate}
      </if>
      <if test="publishUserId != null and publishUserId != ''">
        and PUBLISH_USER_ID = #{publishUserId}
      </if>
      <if test="publishUserName != null and publishUserName != ''">
        and PUBLISH_USER_NAME = #{publishUserName}
      </if>
      <if test="publishIp != null and publishIp != ''">
        and PUBLISH_IP = #{publishIp}
      </if>
      <if test="publishToUrl != null and publishToUrl != ''">
        and PUBLISH_TO_URL = #{publishToUrl}
      </if>
      <if test="downloadFromUrl != null and downloadFromUrl != ''">
        and DOWNLOAD_FROM_URL = #{downloadFromUrl}
      </if>
      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
        and IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag}
      </if>
      <if test="remark != null and remark != ''">
        and REMARK = #{remark}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </if>
      <if test="createId != null and createId != ''">
        and CREATE_ID = #{createId}
      </if>
      <if test="createName != null and createName != ''">
        and CREATE_NAME = #{createName}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateId != null and updateId != ''">
        and UPDATE_ID = #{updateId}
      </if>
      <if test="updateName != null and updateName != ''">
        and UPDATE_NAME = #{updateName}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="versionId != null and versionId != ''">
        and VERSION_ID LIKE '%${versionId}%'
      </if>
      <if test="teantId != null and teantId != ''">
        and TEANT_ID LIKE '%${teantId}%'
      </if>
      <if test="programId != null and programId != ''">
        and PROGRAM_ID LIKE '%${programId}%'
      </if>
      <if test="programName != null and programName != ''">
        and PROGRAM_NAME LIKE '%${programName}%'
      </if>
      <if test="versionNum != null and versionNum != ''">
        and VERSION_NUM LIKE '%${versionNum}%'
      </if>
      <if test="programType != null and programType != ''">
        and PROGRAM_TYPE LIKE '%${programType}%'
      </if>
      <if test="versionUpdateContent != null and versionUpdateContent != ''">
        and VERSION_UPDATE_CONTENT LIKE '%${versionUpdateContent}%'
      </if>
      <if test="publishDate != null">
        and TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = #{publishDate}
      </if>
      <if test="publishUserId != null and publishUserId != ''">
        and PUBLISH_USER_ID LIKE '%${publishUserId}%'
      </if>
      <if test="publishUserName != null and publishUserName != ''">
        and PUBLISH_USER_NAME LIKE '%${publishUserName}%'
      </if>
      <if test="publishIp != null and publishIp != ''">
        and PUBLISH_IP LIKE '%${publishIp}%'
      </if>
      <if test="publishToUrl != null and publishToUrl != ''">
        and PUBLISH_TO_URL LIKE '%${publishToUrl}%'
      </if>
      <if test="downloadFromUrl != null and downloadFromUrl != ''">
        and DOWNLOAD_FROM_URL LIKE '%${downloadFromUrl}%'
      </if>
      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
        and IS_MUST_DOWNLOAD_TAG LIKE '%${isMustDownloadTag}%'
      </if>
      <if test="remark != null and remark != ''">
        and REMARK LIKE '%${remark}%'
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG LIKE '%${valueFlag}%'
      </if>
      <if test="createId != null and createId != ''">
        and CREATE_ID LIKE '%${createId}%'
      </if>
      <if test="createName != null and createName != ''">
        and CREATE_NAME LIKE '%${createName}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateId != null and updateId != ''">
        and UPDATE_ID LIKE '%${updateId}%'
      </if>
      <if test="updateName != null and updateName != ''">
        and UPDATE_NAME LIKE '%${updateName}%'
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from APP_VERSION_MSG
    where VERSION_ID = #{versionId,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from APP_VERSION_MSG
    where 1!=1 
      <if test="teantId != null and teantId != ''">
        or TEANT_ID = #{teantId}
      </if>
      <if test="programId != null and programId != ''">
        or PROGRAM_ID = #{programId}
      </if>
      <if test="programName != null and programName != ''">
        or PROGRAM_NAME = #{programName}
      </if>
      <if test="versionNum != null and versionNum != ''">
        or VERSION_NUM = #{versionNum}
      </if>
      <if test="programType != null and programType != ''">
        or PROGRAM_TYPE = #{programType}
      </if>
      <if test="versionUpdateContent != null and versionUpdateContent != ''">
        or VERSION_UPDATE_CONTENT = #{versionUpdateContent}
      </if>
      <if test="publishDate != null">
        or TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = '#{publishDate}'
      </if>
      <if test="publishUserId != null and publishUserId != ''">
        or PUBLISH_USER_ID = #{publishUserId}
      </if>
      <if test="publishUserName != null and publishUserName != ''">
        or PUBLISH_USER_NAME = #{publishUserName}
      </if>
      <if test="publishIp != null and publishIp != ''">
        or PUBLISH_IP = #{publishIp}
      </if>
      <if test="publishToUrl != null and publishToUrl != ''">
        or PUBLISH_TO_URL = #{publishToUrl}
      </if>
      <if test="downloadFromUrl != null and downloadFromUrl != ''">
        or DOWNLOAD_FROM_URL = #{downloadFromUrl}
      </if>
      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
        or IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag}
      </if>
      <if test="remark != null and remark != ''">
        or REMARK = #{remark}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        or VALUE_FLAG = #{valueFlag}
      </if>
      <if test="createId != null and createId != ''">
        or CREATE_ID = #{createId}
      </if>
      <if test="createName != null and createName != ''">
        or CREATE_NAME = #{createName}
      </if>
      <if test="createTime != null">
        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
      </if>
      <if test="updateId != null and updateId != ''">
        or UPDATE_ID = #{updateId}
      </if>
      <if test="updateName != null and updateName != ''">
        or UPDATE_NAME = #{updateName}
      </if>
      <if test="updateTime != null">
        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
    insert into APP_VERSION_MSG (VERSION_ID, TEANT_ID, PROGRAM_ID, 
      PROGRAM_NAME, VERSION_NUM, PROGRAM_TYPE, 
      VERSION_UPDATE_CONTENT, PUBLISH_DATE, PUBLISH_USER_ID, 
      PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, 
      DOWNLOAD_FROM_URL, IS_MUST_DOWNLOAD_TAG, REMARK, 
      VALUE_FLAG, CREATE_ID, CREATE_NAME, 
      CREATE_TIME, UPDATE_ID, UPDATE_NAME, 
      UPDATE_TIME)
    values (#{versionId,jdbcType=VARCHAR}, #{teantId,jdbcType=VARCHAR}, #{programId,jdbcType=VARCHAR}, 
      #{programName,jdbcType=VARCHAR}, #{versionNum,jdbcType=VARCHAR}, #{programType,jdbcType=VARCHAR}, 
      #{versionUpdateContent,jdbcType=VARCHAR}, #{publishDate,jdbcType=TIMESTAMP}, #{publishUserId,jdbcType=VARCHAR}, 
      #{publishUserName,jdbcType=VARCHAR}, #{publishIp,jdbcType=VARCHAR}, #{publishToUrl,jdbcType=VARCHAR}, 
      #{downloadFromUrl,jdbcType=VARCHAR}, #{isMustDownloadTag,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
      #{valueFlag,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateId,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
    insert into APP_VERSION_MSG
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="versionId != null">
        VERSION_ID,
      </if>
      <if test="teantId != null">
        TEANT_ID,
      </if>
      <if test="programId != null">
        PROGRAM_ID,
      </if>
      <if test="programName != null">
        PROGRAM_NAME,
      </if>
      <if test="versionNum != null">
        VERSION_NUM,
      </if>
      <if test="programType != null">
        PROGRAM_TYPE,
      </if>
      <if test="versionUpdateContent != null">
        VERSION_UPDATE_CONTENT,
      </if>
      <if test="publishDate != null">
        PUBLISH_DATE,
      </if>
      <if test="publishUserId != null">
        PUBLISH_USER_ID,
      </if>
      <if test="publishUserName != null">
        PUBLISH_USER_NAME,
      </if>
      <if test="publishIp != null">
        PUBLISH_IP,
      </if>
      <if test="publishToUrl != null">
        PUBLISH_TO_URL,
      </if>
      <if test="downloadFromUrl != null">
        DOWNLOAD_FROM_URL,
      </if>
      <if test="isMustDownloadTag != null">
        IS_MUST_DOWNLOAD_TAG,
      </if>
      <if test="remark != null">
        REMARK,
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG,
      </if>
      <if test="createId != null">
        CREATE_ID,
      </if>
      <if test="createName != null">
        CREATE_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateId != null">
        UPDATE_ID,
      </if>
      <if test="updateName != null">
        UPDATE_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="versionId != null">
        #{versionId,jdbcType=VARCHAR},
      </if>
      <if test="teantId != null">
        #{teantId,jdbcType=VARCHAR},
      </if>
      <if test="programId != null">
        #{programId,jdbcType=VARCHAR},
      </if>
      <if test="programName != null">
        #{programName,jdbcType=VARCHAR},
      </if>
      <if test="versionNum != null">
        #{versionNum,jdbcType=VARCHAR},
      </if>
      <if test="programType != null">
        #{programType,jdbcType=VARCHAR},
      </if>
      <if test="versionUpdateContent != null">
        #{versionUpdateContent,jdbcType=VARCHAR},
      </if>
      <if test="publishDate != null">
        #{publishDate,jdbcType=TIMESTAMP},
      </if>
      <if test="publishUserId != null">
        #{publishUserId,jdbcType=VARCHAR},
      </if>
      <if test="publishUserName != null">
        #{publishUserName,jdbcType=VARCHAR},
      </if>
      <if test="publishIp != null">
        #{publishIp,jdbcType=VARCHAR},
      </if>
      <if test="publishToUrl != null">
        #{publishToUrl,jdbcType=VARCHAR},
      </if>
      <if test="downloadFromUrl != null">
        #{downloadFromUrl,jdbcType=VARCHAR},
      </if>
      <if test="isMustDownloadTag != null">
        #{isMustDownloadTag,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=VARCHAR},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateId != null">
        #{updateId,jdbcType=VARCHAR},
      </if>
      <if test="updateName != null">
        #{updateName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
    update APP_VERSION_MSG
    set TEANT_ID = #{teantId,jdbcType=VARCHAR},
      PROGRAM_ID = #{programId,jdbcType=VARCHAR},
      PROGRAM_NAME = #{programName,jdbcType=VARCHAR},
      VERSION_NUM = #{versionNum,jdbcType=VARCHAR},
      PROGRAM_TYPE = #{programType,jdbcType=VARCHAR},
      VERSION_UPDATE_CONTENT = #{versionUpdateContent,jdbcType=VARCHAR},
      PUBLISH_DATE = #{publishDate,jdbcType=TIMESTAMP},
      PUBLISH_USER_ID = #{publishUserId,jdbcType=VARCHAR},
      PUBLISH_USER_NAME = #{publishUserName,jdbcType=VARCHAR},
      PUBLISH_IP = #{publishIp,jdbcType=VARCHAR},
      PUBLISH_TO_URL = #{publishToUrl,jdbcType=VARCHAR},
      DOWNLOAD_FROM_URL = #{downloadFromUrl,jdbcType=VARCHAR},
      IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag,jdbcType=VARCHAR},
      REMARK = #{remark,jdbcType=VARCHAR},
      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      CREATE_ID = #{createId,jdbcType=VARCHAR},
      CREATE_NAME = #{createName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_ID = #{updateId,jdbcType=VARCHAR},
      UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
    where VERSION_ID = #{versionId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
    update APP_VERSION_MSG
    <set>
      <if test="teantId != null">
        TEANT_ID = #{teantId,jdbcType=VARCHAR},
      </if>
      <if test="programId != null">
        PROGRAM_ID = #{programId,jdbcType=VARCHAR},
      </if>
      <if test="programName != null">
        PROGRAM_NAME = #{programName,jdbcType=VARCHAR},
      </if>
      <if test="versionNum != null">
        VERSION_NUM = #{versionNum,jdbcType=VARCHAR},
      </if>
      <if test="programType != null">
        PROGRAM_TYPE = #{programType,jdbcType=VARCHAR},
      </if>
      <if test="versionUpdateContent != null">
        VERSION_UPDATE_CONTENT = #{versionUpdateContent,jdbcType=VARCHAR},
      </if>
      <if test="publishDate != null">
        PUBLISH_DATE = #{publishDate,jdbcType=TIMESTAMP},
      </if>
      <if test="publishUserId != null">
        PUBLISH_USER_ID = #{publishUserId,jdbcType=VARCHAR},
      </if>
      <if test="publishUserName != null">
        PUBLISH_USER_NAME = #{publishUserName,jdbcType=VARCHAR},
      </if>
      <if test="publishIp != null">
        PUBLISH_IP = #{publishIp,jdbcType=VARCHAR},
      </if>
      <if test="publishToUrl != null">
        PUBLISH_TO_URL = #{publishToUrl,jdbcType=VARCHAR},
      </if>
      <if test="downloadFromUrl != null">
        DOWNLOAD_FROM_URL = #{downloadFromUrl,jdbcType=VARCHAR},
      </if>
      <if test="isMustDownloadTag != null">
        IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        CREATE_ID = #{createId,jdbcType=VARCHAR},
      </if>
      <if test="createName != null">
        CREATE_NAME = #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateId != null">
        UPDATE_ID = #{updateId,jdbcType=VARCHAR},
      </if>
      <if test="updateName != null">
        UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where VERSION_ID = #{versionId,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select" />
    where VERSION_ID = #{versionId,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 APP_VERSION_MSG 
      (VERSION_ID, 
      TEANT_ID, PROGRAM_ID, PROGRAM_NAME, 
      VERSION_NUM, PROGRAM_TYPE, VERSION_UPDATE_CONTENT, 
      PUBLISH_DATE, PUBLISH_USER_ID, 
      PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, 
      DOWNLOAD_FROM_URL, IS_MUST_DOWNLOAD_TAG, 
      REMARK, VALUE_FLAG, CREATE_ID, 
      CREATE_NAME, CREATE_TIME, UPDATE_ID, 
      UPDATE_NAME, UPDATE_TIME)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.versionId,jdbcType=VARCHAR}, 
      #{item.teantId,jdbcType=VARCHAR}, #{item.programId,jdbcType=VARCHAR}, #{item.programName,jdbcType=VARCHAR}, 
      #{item.versionNum,jdbcType=VARCHAR}, #{item.programType,jdbcType=VARCHAR}, #{item.versionUpdateContent,jdbcType=VARCHAR}, 
      #{item.publishDate,jdbcType=TIMESTAMP}, #{item.publishUserId,jdbcType=VARCHAR}, 
      #{item.publishUserName,jdbcType=VARCHAR}, #{item.publishIp,jdbcType=VARCHAR}, #{item.publishToUrl,jdbcType=VARCHAR}, 
      #{item.downloadFromUrl,jdbcType=VARCHAR}, #{item.isMustDownloadTag,jdbcType=VARCHAR}, 
      #{item.remark,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, #{item.createId,jdbcType=VARCHAR}, 
      #{item.createName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateId,jdbcType=VARCHAR}, 
      #{item.updateName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update APP_VERSION_MSG
     set
       VERSION_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.versionId,jdbcType=VARCHAR}
       </foreach>
       ,TEANT_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.teantId,jdbcType=VARCHAR}
       </foreach>
       ,PROGRAM_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.programId,jdbcType=VARCHAR}
       </foreach>
       ,PROGRAM_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.programName,jdbcType=VARCHAR}
       </foreach>
       ,VERSION_NUM=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.versionNum,jdbcType=VARCHAR}
       </foreach>
       ,PROGRAM_TYPE=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.programType,jdbcType=VARCHAR}
       </foreach>
       ,VERSION_UPDATE_CONTENT=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.versionUpdateContent,jdbcType=VARCHAR}
       </foreach>
       ,PUBLISH_DATE=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishDate,jdbcType=TIMESTAMP}
       </foreach>
       ,PUBLISH_USER_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishUserId,jdbcType=VARCHAR}
       </foreach>
       ,PUBLISH_USER_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishUserName,jdbcType=VARCHAR}
       </foreach>
       ,PUBLISH_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishIp,jdbcType=VARCHAR}
       </foreach>
       ,PUBLISH_TO_URL=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishToUrl,jdbcType=VARCHAR}
       </foreach>
       ,DOWNLOAD_FROM_URL=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.downloadFromUrl,jdbcType=VARCHAR}
       </foreach>
       ,IS_MUST_DOWNLOAD_TAG=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.isMustDownloadTag,jdbcType=VARCHAR}
       </foreach>
       ,REMARK=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.remark,jdbcType=VARCHAR}
       </foreach>
       ,VALUE_FLAG=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.createId,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.createName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateId,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
     where VERSION_ID in 
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
    #{item.versionId,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from APP_VERSION_MSG
    where VERSION_ID in 
    <foreach close=")" collection="list" item="id" open="(" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  
  
</mapper>