<?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.chaozhanggui.dao.system.dao.TbPlussMerchantRegistAuditRecordMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistAuditRecord">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="agentCode" jdbcType="VARCHAR" property="agentcode" />
    <result column="agentName" jdbcType="VARCHAR" property="agentname" />
    <result column="creator" jdbcType="VARCHAR" property="creator" />
    <result column="message" jdbcType="VARCHAR" property="message" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="failReason" jdbcType="VARCHAR" property="failreason" />
    <result column="creatDt" jdbcType="TIMESTAMP" property="creatdt" />
    <result column="modifyStatus" jdbcType="VARCHAR" property="modifystatus" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, agentCode, agentName, creator, message, type, status, 
    failReason, creatDt, modifyStatus
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_regist_audit_record
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_regist_audit_record
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistAuditRecord">
    insert into tb_pluss_merchant_regist_audit_record (id, merchantCode, merchantName, 
      agentCode, agentName, creator, 
      message, type, status, 
      failReason, creatDt, modifyStatus
      )
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{agentcode,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, 
      #{message,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
      #{failreason,jdbcType=VARCHAR}, #{creatdt,jdbcType=TIMESTAMP}, #{modifystatus,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistAuditRecord">
    insert into tb_pluss_merchant_regist_audit_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="agentcode != null">
        agentCode,
      </if>
      <if test="agentname != null">
        agentName,
      </if>
      <if test="creator != null">
        creator,
      </if>
      <if test="message != null">
        message,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="failreason != null">
        failReason,
      </if>
      <if test="creatdt != null">
        creatDt,
      </if>
      <if test="modifystatus != null">
        modifyStatus,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="agentcode != null">
        #{agentcode,jdbcType=VARCHAR},
      </if>
      <if test="agentname != null">
        #{agentname,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        #{message,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="creatdt != null">
        #{creatdt,jdbcType=TIMESTAMP},
      </if>
      <if test="modifystatus != null">
        #{modifystatus,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistAuditRecord">
    update tb_pluss_merchant_regist_audit_record
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="agentcode != null">
        agentCode = #{agentcode,jdbcType=VARCHAR},
      </if>
      <if test="agentname != null">
        agentName = #{agentname,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        creator = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        message = #{message,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        failReason = #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="creatdt != null">
        creatDt = #{creatdt,jdbcType=TIMESTAMP},
      </if>
      <if test="modifystatus != null">
        modifyStatus = #{modifystatus,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistAuditRecord">
    update tb_pluss_merchant_regist_audit_record
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      agentCode = #{agentcode,jdbcType=VARCHAR},
      agentName = #{agentname,jdbcType=VARCHAR},
      creator = #{creator,jdbcType=VARCHAR},
      message = #{message,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      failReason = #{failreason,jdbcType=VARCHAR},
      creatDt = #{creatdt,jdbcType=TIMESTAMP},
      modifyStatus = #{modifystatus,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>