<?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.TbPlussMerchantOrderSplitDetailMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitDetail">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantId" jdbcType="VARCHAR" property="merchantid" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="orderAmt" jdbcType="DECIMAL" property="orderamt" />
    <result column="divRatio" jdbcType="DECIMAL" property="divratio" />
    <result column="divAmt" jdbcType="DECIMAL" property="divamt" />
    <result column="finalAmt" jdbcType="DECIMAL" property="finalamt" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="isChargeFee" jdbcType="VARCHAR" property="ischargefee" />
    <result column="status" jdbcType="TINYINT" property="status" />
    <result column="refundAmt" jdbcType="DECIMAL" property="refundamt" />
    <result column="state" jdbcType="VARCHAR" property="state" />
    <result column="channelSendSn" jdbcType="VARCHAR" property="channelsendsn" />
    <result column="channelRecvSn" jdbcType="VARCHAR" property="channelrecvsn" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantId, merchantName, orderNumber, orderAmt, divRatio, divAmt, 
    finalAmt, remark, createTime, isChargeFee, status, refundAmt, state, channelSendSn, 
    channelRecvSn
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_order_split_detail
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_order_split_detail
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitDetail">
    insert into tb_pluss_merchant_order_split_detail (id, merchantCode, merchantId, 
      merchantName, orderNumber, orderAmt, 
      divRatio, divAmt, finalAmt, 
      remark, createTime, isChargeFee, 
      status, refundAmt, state, 
      channelSendSn, channelRecvSn)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantid,jdbcType=VARCHAR}, 
      #{merchantname,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, #{orderamt,jdbcType=DECIMAL}, 
      #{divratio,jdbcType=DECIMAL}, #{divamt,jdbcType=DECIMAL}, #{finalamt,jdbcType=DECIMAL}, 
      #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{ischargefee,jdbcType=VARCHAR}, 
      #{status,jdbcType=TINYINT}, #{refundamt,jdbcType=DECIMAL}, #{state,jdbcType=VARCHAR}, 
      #{channelsendsn,jdbcType=VARCHAR}, #{channelrecvsn,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitDetail">
    insert into tb_pluss_merchant_order_split_detail
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantid != null">
        merchantId,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="orderamt != null">
        orderAmt,
      </if>
      <if test="divratio != null">
        divRatio,
      </if>
      <if test="divamt != null">
        divAmt,
      </if>
      <if test="finalamt != null">
        finalAmt,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="ischargefee != null">
        isChargeFee,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="refundamt != null">
        refundAmt,
      </if>
      <if test="state != null">
        state,
      </if>
      <if test="channelsendsn != null">
        channelSendSn,
      </if>
      <if test="channelrecvsn != null">
        channelRecvSn,
      </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="merchantid != null">
        #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="orderamt != null">
        #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="divratio != null">
        #{divratio,jdbcType=DECIMAL},
      </if>
      <if test="divamt != null">
        #{divamt,jdbcType=DECIMAL},
      </if>
      <if test="finalamt != null">
        #{finalamt,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ischargefee != null">
        #{ischargefee,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="refundamt != null">
        #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="state != null">
        #{state,jdbcType=VARCHAR},
      </if>
      <if test="channelsendsn != null">
        #{channelsendsn,jdbcType=VARCHAR},
      </if>
      <if test="channelrecvsn != null">
        #{channelrecvsn,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitDetail">
    update tb_pluss_merchant_order_split_detail
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        merchantId = #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="orderamt != null">
        orderAmt = #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="divratio != null">
        divRatio = #{divratio,jdbcType=DECIMAL},
      </if>
      <if test="divamt != null">
        divAmt = #{divamt,jdbcType=DECIMAL},
      </if>
      <if test="finalamt != null">
        finalAmt = #{finalamt,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ischargefee != null">
        isChargeFee = #{ischargefee,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="refundamt != null">
        refundAmt = #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="state != null">
        state = #{state,jdbcType=VARCHAR},
      </if>
      <if test="channelsendsn != null">
        channelSendSn = #{channelsendsn,jdbcType=VARCHAR},
      </if>
      <if test="channelrecvsn != null">
        channelRecvSn = #{channelrecvsn,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitDetail">
    update tb_pluss_merchant_order_split_detail
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantId = #{merchantid,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      orderAmt = #{orderamt,jdbcType=DECIMAL},
      divRatio = #{divratio,jdbcType=DECIMAL},
      divAmt = #{divamt,jdbcType=DECIMAL},
      finalAmt = #{finalamt,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      isChargeFee = #{ischargefee,jdbcType=VARCHAR},
      status = #{status,jdbcType=TINYINT},
      refundAmt = #{refundamt,jdbcType=DECIMAL},
      state = #{state,jdbcType=VARCHAR},
      channelSendSn = #{channelsendsn,jdbcType=VARCHAR},
      channelRecvSn = #{channelrecvsn,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>