<?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.TbPlussMerchantRefundOrderMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantRefundOrder">
    <id column="ID" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="alias" jdbcType="VARCHAR" property="alias" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="refundNo" jdbcType="VARCHAR" property="refundno" />
    <result column="channelNo" jdbcType="VARCHAR" property="channelno" />
    <result column="payTime" jdbcType="TIMESTAMP" property="paytime" />
    <result column="refundTime" jdbcType="TIMESTAMP" property="refundtime" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="orderType" jdbcType="VARCHAR" property="ordertype" />
    <result column="payTypeCode" jdbcType="VARCHAR" property="paytypecode" />
    <result column="payTypeName" jdbcType="VARCHAR" property="paytypename" />
    <result column="payAmt" jdbcType="DECIMAL" property="payamt" />
    <result column="aisleSwitch" jdbcType="VARCHAR" property="aisleswitch" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="channelMercNo" jdbcType="VARCHAR" property="channelmercno" />
    <result column="failMsg" jdbcType="VARCHAR" property="failmsg" />
    <result column="refundAmt" jdbcType="DECIMAL" property="refundamt" />
    <result column="mercRefundNo" jdbcType="VARCHAR" property="mercrefundno" />
    <result column="notifyUrl" jdbcType="VARCHAR" property="notifyurl" />
    <result column="refundReason" jdbcType="VARCHAR" property="refundreason" />
    <result column="mercOrderNo" jdbcType="VARCHAR" property="mercorderno" />
  </resultMap>
  <sql id="Base_Column_List">
    ID, merchantCode, alias, orderNumber, refundNo, channelNo, payTime, refundTime, status, 
    orderType, payTypeCode, payTypeName, payAmt, aisleSwitch, createTime, channelMercNo, 
    failMsg, refundAmt, mercRefundNo, notifyUrl, refundReason, mercOrderNo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_refund_order
    where ID = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_refund_order
    where ID = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRefundOrder">
    insert into tb_pluss_merchant_refund_order (ID, merchantCode, alias, 
      orderNumber, refundNo, channelNo, 
      payTime, refundTime, status, 
      orderType, payTypeCode, payTypeName, 
      payAmt, aisleSwitch, createTime, 
      channelMercNo, failMsg, refundAmt, 
      mercRefundNo, notifyUrl, refundReason, 
      mercOrderNo)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR}, 
      #{ordernumber,jdbcType=VARCHAR}, #{refundno,jdbcType=VARCHAR}, #{channelno,jdbcType=VARCHAR}, 
      #{paytime,jdbcType=TIMESTAMP}, #{refundtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{ordertype,jdbcType=VARCHAR}, #{paytypecode,jdbcType=VARCHAR}, #{paytypename,jdbcType=VARCHAR}, 
      #{payamt,jdbcType=DECIMAL}, #{aisleswitch,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, 
      #{channelmercno,jdbcType=VARCHAR}, #{failmsg,jdbcType=VARCHAR}, #{refundamt,jdbcType=DECIMAL}, 
      #{mercrefundno,jdbcType=VARCHAR}, #{notifyurl,jdbcType=VARCHAR}, #{refundreason,jdbcType=VARCHAR}, 
      #{mercorderno,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRefundOrder">
    insert into tb_pluss_merchant_refund_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="alias != null">
        alias,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="refundno != null">
        refundNo,
      </if>
      <if test="channelno != null">
        channelNo,
      </if>
      <if test="paytime != null">
        payTime,
      </if>
      <if test="refundtime != null">
        refundTime,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="ordertype != null">
        orderType,
      </if>
      <if test="paytypecode != null">
        payTypeCode,
      </if>
      <if test="paytypename != null">
        payTypeName,
      </if>
      <if test="payamt != null">
        payAmt,
      </if>
      <if test="aisleswitch != null">
        aisleSwitch,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="channelmercno != null">
        channelMercNo,
      </if>
      <if test="failmsg != null">
        failMsg,
      </if>
      <if test="refundamt != null">
        refundAmt,
      </if>
      <if test="mercrefundno != null">
        mercRefundNo,
      </if>
      <if test="notifyurl != null">
        notifyUrl,
      </if>
      <if test="refundreason != null">
        refundReason,
      </if>
      <if test="mercorderno != null">
        mercOrderNo,
      </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="alias != null">
        #{alias,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="refundno != null">
        #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        #{channelno,jdbcType=VARCHAR},
      </if>
      <if test="paytime != null">
        #{paytime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundtime != null">
        #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="ordertype != null">
        #{ordertype,jdbcType=VARCHAR},
      </if>
      <if test="paytypecode != null">
        #{paytypecode,jdbcType=VARCHAR},
      </if>
      <if test="paytypename != null">
        #{paytypename,jdbcType=VARCHAR},
      </if>
      <if test="payamt != null">
        #{payamt,jdbcType=DECIMAL},
      </if>
      <if test="aisleswitch != null">
        #{aisleswitch,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelmercno != null">
        #{channelmercno,jdbcType=VARCHAR},
      </if>
      <if test="failmsg != null">
        #{failmsg,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="mercrefundno != null">
        #{mercrefundno,jdbcType=VARCHAR},
      </if>
      <if test="notifyurl != null">
        #{notifyurl,jdbcType=VARCHAR},
      </if>
      <if test="refundreason != null">
        #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        #{mercorderno,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRefundOrder">
    update tb_pluss_merchant_refund_order
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="alias != null">
        alias = #{alias,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="refundno != null">
        refundNo = #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        channelNo = #{channelno,jdbcType=VARCHAR},
      </if>
      <if test="paytime != null">
        payTime = #{paytime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundtime != null">
        refundTime = #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="ordertype != null">
        orderType = #{ordertype,jdbcType=VARCHAR},
      </if>
      <if test="paytypecode != null">
        payTypeCode = #{paytypecode,jdbcType=VARCHAR},
      </if>
      <if test="paytypename != null">
        payTypeName = #{paytypename,jdbcType=VARCHAR},
      </if>
      <if test="payamt != null">
        payAmt = #{payamt,jdbcType=DECIMAL},
      </if>
      <if test="aisleswitch != null">
        aisleSwitch = #{aisleswitch,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelmercno != null">
        channelMercNo = #{channelmercno,jdbcType=VARCHAR},
      </if>
      <if test="failmsg != null">
        failMsg = #{failmsg,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        refundAmt = #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="mercrefundno != null">
        mercRefundNo = #{mercrefundno,jdbcType=VARCHAR},
      </if>
      <if test="notifyurl != null">
        notifyUrl = #{notifyurl,jdbcType=VARCHAR},
      </if>
      <if test="refundreason != null">
        refundReason = #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        mercOrderNo = #{mercorderno,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRefundOrder">
    update tb_pluss_merchant_refund_order
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      alias = #{alias,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      refundNo = #{refundno,jdbcType=VARCHAR},
      channelNo = #{channelno,jdbcType=VARCHAR},
      payTime = #{paytime,jdbcType=TIMESTAMP},
      refundTime = #{refundtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=VARCHAR},
      orderType = #{ordertype,jdbcType=VARCHAR},
      payTypeCode = #{paytypecode,jdbcType=VARCHAR},
      payTypeName = #{paytypename,jdbcType=VARCHAR},
      payAmt = #{payamt,jdbcType=DECIMAL},
      aisleSwitch = #{aisleswitch,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      channelMercNo = #{channelmercno,jdbcType=VARCHAR},
      failMsg = #{failmsg,jdbcType=VARCHAR},
      refundAmt = #{refundamt,jdbcType=DECIMAL},
      mercRefundNo = #{mercrefundno,jdbcType=VARCHAR},
      notifyUrl = #{notifyurl,jdbcType=VARCHAR},
      refundReason = #{refundreason,jdbcType=VARCHAR},
      mercOrderNo = #{mercorderno,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=INTEGER}
  </update>
</mapper>