<?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.TbPlussMerchantOrderSplitRefundMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitRefund">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="mercOrderNo" jdbcType="VARCHAR" property="mercorderno" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="orderAmt" jdbcType="DECIMAL" property="orderamt" />
    <result column="orderTime" jdbcType="TIMESTAMP" property="ordertime" />
    <result column="refundNo" jdbcType="VARCHAR" property="refundno" />
    <result column="mercRefundNo" jdbcType="VARCHAR" property="mercrefundno" />
    <result column="refundTime" jdbcType="TIMESTAMP" property="refundtime" />
    <result column="notifyUrl" jdbcType="VARCHAR" property="notifyurl" />
    <result column="refundAmt" jdbcType="DECIMAL" property="refundamt" />
    <result column="refundReason" jdbcType="VARCHAR" property="refundreason" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="channelRefundState" jdbcType="VARCHAR" property="channelrefundstate" />
    <result column="channelFundsState" jdbcType="VARCHAR" property="channelfundsstate" />
    <result column="channelFundsDesc" jdbcType="VARCHAR" property="channelfundsdesc" />
    <result column="channelRefundNo" jdbcType="VARCHAR" property="channelrefundno" />
  </resultMap>
  <sql id="Base_Column_List">
    id, orderNumber, mercOrderNo, status, orderAmt, orderTime, refundNo, mercRefundNo, 
    refundTime, notifyUrl, refundAmt, refundReason, remark, channelRefundState, channelFundsState, 
    channelFundsDesc, channelRefundNo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_order_split_refund
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_order_split_refund
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitRefund">
    insert into tb_pluss_merchant_order_split_refund (id, orderNumber, mercOrderNo, 
      status, orderAmt, orderTime, 
      refundNo, mercRefundNo, refundTime, 
      notifyUrl, refundAmt, refundReason, 
      remark, channelRefundState, channelFundsState, 
      channelFundsDesc, channelRefundNo)
    values (#{id,jdbcType=INTEGER}, #{ordernumber,jdbcType=VARCHAR}, #{mercorderno,jdbcType=VARCHAR}, 
      #{status,jdbcType=INTEGER}, #{orderamt,jdbcType=DECIMAL}, #{ordertime,jdbcType=TIMESTAMP}, 
      #{refundno,jdbcType=VARCHAR}, #{mercrefundno,jdbcType=VARCHAR}, #{refundtime,jdbcType=TIMESTAMP}, 
      #{notifyurl,jdbcType=VARCHAR}, #{refundamt,jdbcType=DECIMAL}, #{refundreason,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{channelrefundstate,jdbcType=VARCHAR}, #{channelfundsstate,jdbcType=VARCHAR}, 
      #{channelfundsdesc,jdbcType=VARCHAR}, #{channelrefundno,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitRefund">
    insert into tb_pluss_merchant_order_split_refund
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="mercorderno != null">
        mercOrderNo,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="orderamt != null">
        orderAmt,
      </if>
      <if test="ordertime != null">
        orderTime,
      </if>
      <if test="refundno != null">
        refundNo,
      </if>
      <if test="mercrefundno != null">
        mercRefundNo,
      </if>
      <if test="refundtime != null">
        refundTime,
      </if>
      <if test="notifyurl != null">
        notifyUrl,
      </if>
      <if test="refundamt != null">
        refundAmt,
      </if>
      <if test="refundreason != null">
        refundReason,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="channelrefundstate != null">
        channelRefundState,
      </if>
      <if test="channelfundsstate != null">
        channelFundsState,
      </if>
      <if test="channelfundsdesc != null">
        channelFundsDesc,
      </if>
      <if test="channelrefundno != null">
        channelRefundNo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        #{mercorderno,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="orderamt != null">
        #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="ordertime != null">
        #{ordertime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundno != null">
        #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="mercrefundno != null">
        #{mercrefundno,jdbcType=VARCHAR},
      </if>
      <if test="refundtime != null">
        #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="notifyurl != null">
        #{notifyurl,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="refundreason != null">
        #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="channelrefundstate != null">
        #{channelrefundstate,jdbcType=VARCHAR},
      </if>
      <if test="channelfundsstate != null">
        #{channelfundsstate,jdbcType=VARCHAR},
      </if>
      <if test="channelfundsdesc != null">
        #{channelfundsdesc,jdbcType=VARCHAR},
      </if>
      <if test="channelrefundno != null">
        #{channelrefundno,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitRefund">
    update tb_pluss_merchant_order_split_refund
    <set>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        mercOrderNo = #{mercorderno,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="orderamt != null">
        orderAmt = #{orderamt,jdbcType=DECIMAL},
      </if>
      <if test="ordertime != null">
        orderTime = #{ordertime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundno != null">
        refundNo = #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="mercrefundno != null">
        mercRefundNo = #{mercrefundno,jdbcType=VARCHAR},
      </if>
      <if test="refundtime != null">
        refundTime = #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="notifyurl != null">
        notifyUrl = #{notifyurl,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        refundAmt = #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="refundreason != null">
        refundReason = #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="channelrefundstate != null">
        channelRefundState = #{channelrefundstate,jdbcType=VARCHAR},
      </if>
      <if test="channelfundsstate != null">
        channelFundsState = #{channelfundsstate,jdbcType=VARCHAR},
      </if>
      <if test="channelfundsdesc != null">
        channelFundsDesc = #{channelfundsdesc,jdbcType=VARCHAR},
      </if>
      <if test="channelrefundno != null">
        channelRefundNo = #{channelrefundno,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantOrderSplitRefund">
    update tb_pluss_merchant_order_split_refund
    set orderNumber = #{ordernumber,jdbcType=VARCHAR},
      mercOrderNo = #{mercorderno,jdbcType=VARCHAR},
      status = #{status,jdbcType=INTEGER},
      orderAmt = #{orderamt,jdbcType=DECIMAL},
      orderTime = #{ordertime,jdbcType=TIMESTAMP},
      refundNo = #{refundno,jdbcType=VARCHAR},
      mercRefundNo = #{mercrefundno,jdbcType=VARCHAR},
      refundTime = #{refundtime,jdbcType=TIMESTAMP},
      notifyUrl = #{notifyurl,jdbcType=VARCHAR},
      refundAmt = #{refundamt,jdbcType=DECIMAL},
      refundReason = #{refundreason,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      channelRefundState = #{channelrefundstate,jdbcType=VARCHAR},
      channelFundsState = #{channelfundsstate,jdbcType=VARCHAR},
      channelFundsDesc = #{channelfundsdesc,jdbcType=VARCHAR},
      channelRefundNo = #{channelrefundno,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>