<?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.combaseinfo.mapper.ComBaseInfoMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo">
    <id column="BASE_CODE" jdbcType="VARCHAR" property="baseCode" />
    <result column="BASE_NAME" jdbcType="VARCHAR" property="baseName" />
    <result column="P_BASE_CODE" jdbcType="VARCHAR" property="pBaseCode" />
    <result column="IS_EDIT_FLAG" jdbcType="VARCHAR" property="isEditFlag" />
    <result column="IS_CREATE_SUBCLASE_FLAG" jdbcType="VARCHAR" property="isCreateSubclaseFlag" />
    <result column="MNEMONIC_CODE" jdbcType="VARCHAR" property="mnemonicCode" />
    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
    <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" />
  </resultMap>
  <sql id="columns">
    BASE_CODE, BASE_NAME, P_BASE_CODE, IS_EDIT_FLAG, IS_CREATE_SUBCLASE_FLAG, MNEMONIC_CODE, 
    MEMO, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
    UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
  </sql>
  <sql id="columns_alias">
    t.BASE_CODE, t.BASE_NAME, t.P_BASE_CODE, t.IS_EDIT_FLAG, t.IS_CREATE_SUBCLASE_FLAG, 
    t.MNEMONIC_CODE, t.MEMO, t.VALID_FLAG, 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
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM COM_BASE_INFO
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM COM_BASE_INFO t
  </sql>
  <sql id="where">
    <where>
      <if test="baseCode != null and baseCode != ''">
        and BASE_CODE = #{baseCode}
      </if>
      <if test="baseName != null and baseName != ''">
        and BASE_NAME = #{baseName}
      </if>
      <if test="mnemonicCode != null and mnemonicCode != ''">
        and MNEMONIC_CODE = #{mnemonicCode}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO = #{memo}
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG = #{validFlag}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="pBaseCode != null and pBaseCode != ''">
        and P_BASE_CODE = #{pBaseCode}
      </if>
      <if test="isEditFlag != null and isEditFlag != ''">
        and IS_EDIT_FLAG = #{isEditFlag}
      </if>
      <if test="isCreateSubclaseFlag != null and isCreateSubclaseFlag != ''">
        and IS_CREATE_SUBCLASE_FLAG = #{isCreateSubclaseFlag}
      </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="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO = #{updateManNo}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME = #{updateManName}
      </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>
    </where>
  </sql>
  <sql id="whereLike">
    <where>
      <if test="baseCode != null and baseCode != ''">
        and BASE_CODE LIKE '%${baseCode}%'
      </if>
      <if test="baseName != null and baseName != ''">
        and BASE_NAME LIKE '%${baseName}%'
      </if>
      <if test="mnemonicCode != null and mnemonicCode != ''">
        and MNEMONIC_CODE LIKE '%${mnemonicCode}%'
      </if>
      <if test="memo != null and memo != ''">
        and MEMO LIKE '%${memo}%'
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG LIKE '%${validFlag}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="pBaseCode != null and pBaseCode != ''">
        and P_BASE_CODE LIKE '%${pBaseCode}%'
      </if>
      <if test="isEditFlag != null and isEditFlag != ''">
        and IS_EDIT_FLAG LIKE '%${isEditFlag}%'
      </if>
      <if test="isCreateSubclaseFlag != null and isCreateSubclaseFlag != ''">
        and IS_CREATE_SUBCLASE_FLAG LIKE '%${isCreateSubclaseFlag}%'
      </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="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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from COM_BASE_INFO
    where BASE_CODE = #{baseCode,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from COM_BASE_INFO
    where 1!=1 
      <if test="baseName != null and baseName != ''">
        or BASE_NAME = #{baseName}
      </if>
      <if test="pBaseCode != null and pBaseCode != ''">
        or P_BASE_CODE = #{pBaseCode}
      </if>
      <if test="isEditFlag != null and isEditFlag != ''">
        or IS_EDIT_FLAG = #{isEditFlag}
      </if>
      <if test="isCreateSubclaseFlag != null and isCreateSubclaseFlag != ''">
        or IS_CREATE_SUBCLASE_FLAG = #{isCreateSubclaseFlag}
      </if>
      <if test="mnemonicCode != null and mnemonicCode != ''">
        or MNEMONIC_CODE = #{mnemonicCode}
      </if>
      <if test="memo != null and memo != ''">
        or MEMO = #{memo}
      </if>
      <if test="validFlag != null and validFlag != ''">
        or VALID_FLAG = #{validFlag}
      </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>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo">
    insert into COM_BASE_INFO (BASE_CODE, BASE_NAME, P_BASE_CODE, 
      IS_EDIT_FLAG, IS_CREATE_SUBCLASE_FLAG, MNEMONIC_CODE, 
      MEMO, VALID_FLAG, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
      UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
      DELETE_MAN_NAME, DELETE_TIME)
    values (#{baseCode,jdbcType=VARCHAR}, #{baseName,jdbcType=VARCHAR}, #{pBaseCode,jdbcType=VARCHAR}, 
      #{isEditFlag,jdbcType=VARCHAR}, #{isCreateSubclaseFlag,jdbcType=VARCHAR}, #{mnemonicCode,jdbcType=VARCHAR}, 
      #{memo,jdbcType=VARCHAR}, #{validFlag,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})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo">
    insert into COM_BASE_INFO
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="baseCode != null">
        BASE_CODE,
      </if>
      <if test="baseName != null">
        BASE_NAME,
      </if>
      <if test="pBaseCode != null">
        P_BASE_CODE,
      </if>
      <if test="isEditFlag != null">
        IS_EDIT_FLAG,
      </if>
      <if test="isCreateSubclaseFlag != null">
        IS_CREATE_SUBCLASE_FLAG,
      </if>
      <if test="mnemonicCode != null">
        MNEMONIC_CODE,
      </if>
      <if test="memo != null">
        MEMO,
      </if>
      <if test="validFlag != null">
        VALID_FLAG,
      </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>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="baseCode != null">
        #{baseCode,jdbcType=VARCHAR},
      </if>
      <if test="baseName != null">
        #{baseName,jdbcType=VARCHAR},
      </if>
      <if test="pBaseCode != null">
        #{pBaseCode,jdbcType=VARCHAR},
      </if>
      <if test="isEditFlag != null">
        #{isEditFlag,jdbcType=VARCHAR},
      </if>
      <if test="isCreateSubclaseFlag != null">
        #{isCreateSubclaseFlag,jdbcType=VARCHAR},
      </if>
      <if test="mnemonicCode != null">
        #{mnemonicCode,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        #{validFlag,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>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo">
    update COM_BASE_INFO
    set BASE_NAME = #{baseName,jdbcType=VARCHAR},
      P_BASE_CODE = #{pBaseCode,jdbcType=VARCHAR},
      IS_EDIT_FLAG = #{isEditFlag,jdbcType=VARCHAR},
      IS_CREATE_SUBCLASE_FLAG = #{isCreateSubclaseFlag,jdbcType=VARCHAR},
      MNEMONIC_CODE = #{mnemonicCode,jdbcType=VARCHAR},
      MEMO = #{memo,jdbcType=VARCHAR},
      VALID_FLAG = #{validFlag,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}
    where BASE_CODE = #{baseCode,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo">
    update COM_BASE_INFO
    <set>
        <if test="baseCode != null">
        BASE_CODE= #{baseCode,jdbcType=VARCHAR},
        </if>
      <if test="baseName != null">
        BASE_NAME = #{baseName,jdbcType=VARCHAR},
      </if>
      <if test="pBaseCode != null">
        P_BASE_CODE = #{pBaseCode,jdbcType=VARCHAR},
      </if>
      <if test="isEditFlag != null">
        IS_EDIT_FLAG = #{isEditFlag,jdbcType=VARCHAR},
      </if>
      <if test="isCreateSubclaseFlag != null">
        IS_CREATE_SUBCLASE_FLAG = #{isCreateSubclaseFlag,jdbcType=VARCHAR},
      </if>
      <if test="mnemonicCode != null">
        MNEMONIC_CODE = #{mnemonicCode,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        MEMO = #{memo,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        VALID_FLAG = #{validFlag,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>
    </set>
    where BASE_CODE = #{baseCode,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where BASE_CODE = #{baseCode,jdbcType=VARCHAR}
  </select>
  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="where"/>
    order by  base_code desc
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLike"/>d
    order by  base_code desc
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into COM_BASE_INFO 
      (BASE_CODE, 
      BASE_NAME, P_BASE_CODE, IS_EDIT_FLAG, 
      IS_CREATE_SUBCLASE_FLAG, MNEMONIC_CODE, 
      MEMO, VALID_FLAG, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
      )
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.baseCode,jdbcType=VARCHAR}, 
      #{item.baseName,jdbcType=VARCHAR}, #{item.pBaseCode,jdbcType=VARCHAR}, #{item.isEditFlag,jdbcType=VARCHAR}, 
      #{item.isCreateSubclaseFlag,jdbcType=VARCHAR}, #{item.mnemonicCode,jdbcType=VARCHAR}, 
      #{item.memo,jdbcType=VARCHAR}, #{item.validFlag,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}
       from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update COM_BASE_INFO
     set
       BASE_CODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.baseCode,jdbcType=VARCHAR}
       </foreach>
       ,BASE_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.baseName,jdbcType=VARCHAR}
       </foreach>
       ,P_BASE_CODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.pBaseCode,jdbcType=VARCHAR}
       </foreach>
       ,IS_EDIT_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.isEditFlag,jdbcType=VARCHAR}
       </foreach>
       ,IS_CREATE_SUBCLASE_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.isCreateSubclaseFlag,jdbcType=VARCHAR}
       </foreach>
       ,MNEMONIC_CODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.mnemonicCode,jdbcType=VARCHAR}
       </foreach>
       ,MEMO=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
       </foreach>
       ,VALID_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,DELETE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BASE_CODE" close="end">
          when #{item.baseCode,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
       </foreach>
     where BASE_CODE in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
       #{item.baseCode,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from COM_BASE_INFO
    where BASE_CODE in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <select id="selectSpoType"  resultMap="BaseResultMap">
    <include refid="select"/>
    where P_BASE_CODE = '001002' and VALID_FLAG='1'
    order by BASE_CODE desc
  </select>
  <select id="selectVideoType"  resultMap="BaseResultMap">
    <include refid="select"/>
    where P_BASE_CODE = '001020' and VALID_FLAG='1'
    order by BASE_CODE desc
  </select>


  <select id="executeSqlData" parameterType="java.util.HashMap" resultType="HashMap">
    ${sql}
  </select>

  <!--按照表名和主键生成当前最大的序列号；规则为yyyyMMdd+0001-->
  <select id="getConfigID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT to_char(sysdate, 'yyyyMMdd') || LPAD(NVL(MAX(TO_NUMBER(SUBSTR(${primaryKey}, 9))), 0) + 1, 4, '0') ${primaryKey}
    FROM ${tablName}
    where instr(${primaryKey}, to_char(sysdate, 'yyyyMMdd')) > 0 and length(${primaryKey})= 12
  </select>

  <!--按照表名和主键生成当前最大的序列号；规则为yyyyMMdd+0001-->
  <select id="getConfigIDByFive" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT to_char(sysdate, 'yyyyMMdd') || LPAD(NVL(MAX(TO_NUMBER(SUBSTR(${primaryKey}, 9))), 0) + 1, 5, '0') ${primaryKey}
    FROM ${tablName}
    where instr(${primaryKey}, to_char(sysdate, 'yyyyMMdd')) > 0 and length(${primaryKey})= 13
  </select>
</mapper>