<?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.TbPlussMerchantComplaintRecordMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantComplaintRecord">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="orderAmt" jdbcType="DECIMAL" property="orderamt" />
    <result column="payTime" jdbcType="TIMESTAMP" property="paytime" />
    <result column="complaintPhone" jdbcType="VARCHAR" property="complaintphone" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="status" jdbcType="CHAR" property="status" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, orderAmt, payTime, complaintPhone, remark, orderNumber, 
    createTime, status
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_complaint_record
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_complaint_record
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantComplaintRecord">
    insert into tb_pluss_merchant_complaint_record (id, merchantCode, merchantName, 
      orderAmt, payTime, complaintPhone, 
      remark, orderNumber, createTime, 
      status)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{orderamt,jdbcType=DECIMAL}, #{paytime,jdbcType=TIMESTAMP}, #{complaintphone,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, 
      #{status,jdbcType=CHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantComplaintRecord">
    insert into tb_pluss_merchant_complaint_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="orderamt != null">
        orderAmt,
      </if>
      <if test="paytime != null">
        payTime,
      </if>
      <if test="complaintphone != null">
        complaintPhone,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="status != null">
        status,
      </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="orderamt != null">
        #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="paytime != null">
        #{paytime,jdbcType=TIMESTAMP},
      </if>
      <if test="complaintphone != null">
        #{complaintphone,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=CHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantComplaintRecord">
    update tb_pluss_merchant_complaint_record
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="orderamt != null">
        orderAmt = #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="paytime != null">
        payTime = #{paytime,jdbcType=TIMESTAMP},
      </if>
      <if test="complaintphone != null">
        complaintPhone = #{complaintphone,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=CHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantComplaintRecord">
    update tb_pluss_merchant_complaint_record
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      orderAmt = #{orderamt,jdbcType=DECIMAL},
      payTime = #{paytime,jdbcType=TIMESTAMP},
      complaintPhone = #{complaintphone,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=CHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>