<?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.unis.emergency.server.dao.TzQylxHisMapper" >
  <resultMap id="BaseResultMap" type="com.unis.base.server.dao.TzQylxHisDao" >
    <result column="ID" property="id" jdbcType="DECIMAL" />
    <result column="QYID" property="qyid" jdbcType="DECIMAL" />
    <result column="QYLXMC" property="qylxmc" jdbcType="VARCHAR" />
    <result column="QYLXBH" property="qylxbh" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="DECIMAL" />
    <result column="CREATOR" property="creator" jdbcType="VARCHAR" />
    <result column="CREATOR_CODE" property="creatorCode" jdbcType="VARCHAR" />
    <result column="CREATE_DATE" property="createDate" jdbcType="TIMESTAMP" />
    <result column="REFRESHER" property="refresher" jdbcType="VARCHAR" />
    <result column="REFRESHER_CODE" property="refresherCode" jdbcType="VARCHAR" />
    <result column="REFRESH_TIME" property="refreshTime" jdbcType="TIMESTAMP" />
    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
    <result column="SFBA" property="sfba" jdbcType="VARCHAR" />
  </resultMap>
  
  <sql id="Base_Column_List" >
    ID, QYID, QYLXMC, QYLXBH, STATUS, CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, 
    REFRESHER_CODE, REFRESH_TIME, REMARK, SFBA
  </sql>
  
  <insert id="insertSelective" parameterType="com.unis.base.server.entity.TzQylxHisDO" >
    insert into TZ_QYLX_HIS
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="qyid != null" >
        QYID,
      </if>
      <if test="qylxmc != null" >
        QYLXMC,
      </if>
      <if test="qylxbh != null" >
        QYLXBH,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="creator != null" >
        CREATOR,
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE,
      </if>
      <if test="createDate != null" >
        CREATE_DATE,
      </if>
      <if test="refresher != null" >
        REFRESHER,
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE,
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME,
      </if>
      <if test="remark != null" >
        REMARK,
      </if>
      <if test="sfba != null" >
        SFBA,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=DECIMAL},
      </if>
      <if test="qyid != null" >
        #{qyid,jdbcType=DECIMAL},
      </if>
      <if test="qylxmc != null" >
        #{qylxmc,jdbcType=VARCHAR},
      </if>
      <if test="qylxbh != null" >
        #{qylxbh,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="sfba != null" >
        #{sfba,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  
  <update id="updateByExampleSelective" parameterType="map" >
    update TZ_QYLX_HIS
    <set >
      <if test="id != null" >
        ID = #{id,jdbcType=DECIMAL},
      </if>
      <if test="qyid != null" >
        QYID = #{qyid,jdbcType=DECIMAL},
      </if>
      <if test="qylxmc != null" >
        QYLXMC = #{qylxmc,jdbcType=VARCHAR},
      </if>
      <if test="qylxbh != null" >
        QYLXBH = #{qylxbh,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        STATUS = #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        CREATOR = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE = #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        REFRESHER = #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="sfba != null" >
        SFBA = #{sfba,jdbcType=VARCHAR},
      </if>
    </set>
  </update>
  
</mapper>