<?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.TbPlussMerchantRegistLogMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistLog">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="storeId" jdbcType="VARCHAR" property="storeid" />
    <result column="applyStatus" jdbcType="VARCHAR" property="applystatus" />
    <result column="message" jdbcType="VARCHAR" property="message" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="merchantId" jdbcType="VARCHAR" property="merchantid" />
    <result column="parentCode" jdbcType="VARCHAR" property="parentcode" />
    <result column="creator" jdbcType="VARCHAR" property="creator" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, storeId, applyStatus, message, createDt, merchantName, merchantId, 
    parentCode, creator
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_regist_log
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_regist_log
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistLog">
    insert into tb_pluss_merchant_regist_log (id, merchantCode, storeId, 
      applyStatus, message, createDt, 
      merchantName, merchantId, parentCode, 
      creator)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{storeid,jdbcType=VARCHAR}, 
      #{applystatus,jdbcType=VARCHAR}, #{message,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{merchantname,jdbcType=VARCHAR}, #{merchantid,jdbcType=VARCHAR}, #{parentcode,jdbcType=VARCHAR}, 
      #{creator,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistLog">
    insert into tb_pluss_merchant_regist_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="storeid != null">
        storeId,
      </if>
      <if test="applystatus != null">
        applyStatus,
      </if>
      <if test="message != null">
        message,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="merchantid != null">
        merchantId,
      </if>
      <if test="parentcode != null">
        parentCode,
      </if>
      <if test="creator != null">
        creator,
      </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="storeid != null">
        #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="applystatus != null">
        #{applystatus,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        #{message,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="parentcode != null">
        #{parentcode,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistLog">
    update tb_pluss_merchant_regist_log
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        storeId = #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="applystatus != null">
        applyStatus = #{applystatus,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        message = #{message,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        merchantId = #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="parentcode != null">
        parentCode = #{parentcode,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        creator = #{creator,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRegistLog">
    update tb_pluss_merchant_regist_log
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      storeId = #{storeid,jdbcType=VARCHAR},
      applyStatus = #{applystatus,jdbcType=VARCHAR},
      message = #{message,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      merchantId = #{merchantid,jdbcType=VARCHAR},
      parentCode = #{parentcode,jdbcType=VARCHAR},
      creator = #{creator,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>