<?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.TbPlussMerchantMoveRecordsMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantMoveRecords">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="startTime" jdbcType="TIMESTAMP" property="starttime" />
    <result column="endTime" jdbcType="TIMESTAMP" property="endtime" />
    <result column="token" jdbcType="VARCHAR" property="token" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="ip" jdbcType="VARCHAR" property="ip" />
    <result column="payUserId" jdbcType="VARCHAR" property="payuserid" />
    <result column="payNum" jdbcType="INTEGER" property="paynum" />
    <result column="paySource" jdbcType="INTEGER" property="paysource" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, startTime, endTime, token, createTime, ip, payUserId, 
    payNum, paySource, orderNumber
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_move_records
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_move_records
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMoveRecords">
    insert into tb_pluss_merchant_move_records (id, merchantCode, merchantName, 
      startTime, endTime, token, 
      createTime, ip, payUserId, 
      payNum, paySource, orderNumber
      )
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{token,jdbcType=VARCHAR}, 
      #{createtime,jdbcType=TIMESTAMP}, #{ip,jdbcType=VARCHAR}, #{payuserid,jdbcType=VARCHAR}, 
      #{paynum,jdbcType=INTEGER}, #{paysource,jdbcType=INTEGER}, #{ordernumber,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMoveRecords">
    insert into tb_pluss_merchant_move_records
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="starttime != null">
        startTime,
      </if>
      <if test="endtime != null">
        endTime,
      </if>
      <if test="token != null">
        token,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="ip != null">
        ip,
      </if>
      <if test="payuserid != null">
        payUserId,
      </if>
      <if test="paynum != null">
        payNum,
      </if>
      <if test="paysource != null">
        paySource,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </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="starttime != null">
        #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="token != null">
        #{token,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ip != null">
        #{ip,jdbcType=VARCHAR},
      </if>
      <if test="payuserid != null">
        #{payuserid,jdbcType=VARCHAR},
      </if>
      <if test="paynum != null">
        #{paynum,jdbcType=INTEGER},
      </if>
      <if test="paysource != null">
        #{paysource,jdbcType=INTEGER},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMoveRecords">
    update tb_pluss_merchant_move_records
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="starttime != null">
        startTime = #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        endTime = #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="token != null">
        token = #{token,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ip != null">
        ip = #{ip,jdbcType=VARCHAR},
      </if>
      <if test="payuserid != null">
        payUserId = #{payuserid,jdbcType=VARCHAR},
      </if>
      <if test="paynum != null">
        payNum = #{paynum,jdbcType=INTEGER},
      </if>
      <if test="paysource != null">
        paySource = #{paysource,jdbcType=INTEGER},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMoveRecords">
    update tb_pluss_merchant_move_records
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      startTime = #{starttime,jdbcType=TIMESTAMP},
      endTime = #{endtime,jdbcType=TIMESTAMP},
      token = #{token,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      ip = #{ip,jdbcType=VARCHAR},
      payUserId = #{payuserid,jdbcType=VARCHAR},
      payNum = #{paynum,jdbcType=INTEGER},
      paySource = #{paysource,jdbcType=INTEGER},
      orderNumber = #{ordernumber,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>