<?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.TbPlussJftReceiptOrderMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptOrder">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="rid" jdbcType="INTEGER" property="rid" />
    <result column="amount" jdbcType="DECIMAL" property="amount" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="payType" jdbcType="VARCHAR" property="paytype" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="payUserId" jdbcType="VARCHAR" property="payuserid" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="goods" jdbcType="VARCHAR" property="goods" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="transNo" jdbcType="VARCHAR" property="transno" />
    <result column="channelTransNo" jdbcType="VARCHAR" property="channeltransno" />
    <result column="transTime" jdbcType="TIMESTAMP" property="transtime" />
    <result column="rate" jdbcType="INTEGER" property="rate" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="channelFee" jdbcType="DECIMAL" property="channelfee" />
    <result column="mercFee" jdbcType="DECIMAL" property="mercfee" />
    <result column="cashFee" jdbcType="DECIMAL" property="cashfee" />
    <result column="payData" jdbcType="VARCHAR" property="paydata" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createDate" jdbcType="DATE" property="createdate" />
    <result column="profitFee" jdbcType="DECIMAL" property="profitfee" />
    <result column="payUserCity" jdbcType="VARCHAR" property="payusercity" />
    <result column="subject" jdbcType="VARCHAR" property="subject" />
    <result column="mercOrderNo" jdbcType="VARCHAR" property="mercorderno" />
    <result column="mercNotifyUrl" jdbcType="VARCHAR" property="mercnotifyurl" />
  </resultMap>
  <sql id="Base_Column_List">
    id, rid, amount, status, payType, orderNumber, userId, merchantCode, merchantName, 
    payUserId, name, phone, goods, address, transNo, channelTransNo, transTime, rate, 
    createTime, channelFee, mercFee, cashFee, payData, remark, createDate, profitFee, 
    payUserCity, subject, mercOrderNo, mercNotifyUrl
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_jft_receipt_order
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_jft_receipt_order
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptOrder">
    insert into tb_pluss_jft_receipt_order (id, rid, amount, 
      status, payType, orderNumber, 
      userId, merchantCode, merchantName, 
      payUserId, name, phone, 
      goods, address, transNo, 
      channelTransNo, transTime, rate, 
      createTime, channelFee, mercFee, 
      cashFee, payData, remark, 
      createDate, profitFee, payUserCity, 
      subject, mercOrderNo, mercNotifyUrl
      )
    values (#{id,jdbcType=INTEGER}, #{rid,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, 
      #{status,jdbcType=VARCHAR}, #{paytype,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, 
      #{userid,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{payuserid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, 
      #{goods,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{transno,jdbcType=VARCHAR}, 
      #{channeltransno,jdbcType=VARCHAR}, #{transtime,jdbcType=TIMESTAMP}, #{rate,jdbcType=INTEGER}, 
      #{createtime,jdbcType=TIMESTAMP}, #{channelfee,jdbcType=DECIMAL}, #{mercfee,jdbcType=DECIMAL}, 
      #{cashfee,jdbcType=DECIMAL}, #{paydata,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=DATE}, #{profitfee,jdbcType=DECIMAL}, #{payusercity,jdbcType=VARCHAR}, 
      #{subject,jdbcType=VARCHAR}, #{mercorderno,jdbcType=VARCHAR}, #{mercnotifyurl,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptOrder">
    insert into tb_pluss_jft_receipt_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="rid != null">
        rid,
      </if>
      <if test="amount != null">
        amount,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="paytype != null">
        payType,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="payuserid != null">
        payUserId,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="goods != null">
        goods,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="transno != null">
        transNo,
      </if>
      <if test="channeltransno != null">
        channelTransNo,
      </if>
      <if test="transtime != null">
        transTime,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="channelfee != null">
        channelFee,
      </if>
      <if test="mercfee != null">
        mercFee,
      </if>
      <if test="cashfee != null">
        cashFee,
      </if>
      <if test="paydata != null">
        payData,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createdate != null">
        createDate,
      </if>
      <if test="profitfee != null">
        profitFee,
      </if>
      <if test="payusercity != null">
        payUserCity,
      </if>
      <if test="subject != null">
        subject,
      </if>
      <if test="mercorderno != null">
        mercOrderNo,
      </if>
      <if test="mercnotifyurl != null">
        mercNotifyUrl,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="rid != null">
        #{rid,jdbcType=INTEGER},
      </if>
      <if test="amount != null">
        #{amount,jdbcType=DECIMAL},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="paytype != null">
        #{paytype,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="payuserid != null">
        #{payuserid,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="goods != null">
        #{goods,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="transno != null">
        #{transno,jdbcType=VARCHAR},
      </if>
      <if test="channeltransno != null">
        #{channeltransno,jdbcType=VARCHAR},
      </if>
      <if test="transtime != null">
        #{transtime,jdbcType=TIMESTAMP},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelfee != null">
        #{channelfee,jdbcType=DECIMAL},
      </if>
      <if test="mercfee != null">
        #{mercfee,jdbcType=DECIMAL},
      </if>
      <if test="cashfee != null">
        #{cashfee,jdbcType=DECIMAL},
      </if>
      <if test="paydata != null">
        #{paydata,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null">
        #{createdate,jdbcType=DATE},
      </if>
      <if test="profitfee != null">
        #{profitfee,jdbcType=DECIMAL},
      </if>
      <if test="payusercity != null">
        #{payusercity,jdbcType=VARCHAR},
      </if>
      <if test="subject != null">
        #{subject,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        #{mercorderno,jdbcType=VARCHAR},
      </if>
      <if test="mercnotifyurl != null">
        #{mercnotifyurl,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptOrder">
    update tb_pluss_jft_receipt_order
    <set>
      <if test="rid != null">
        rid = #{rid,jdbcType=INTEGER},
      </if>
      <if test="amount != null">
        amount = #{amount,jdbcType=DECIMAL},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="paytype != null">
        payType = #{paytype,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="payuserid != null">
        payUserId = #{payuserid,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="goods != null">
        goods = #{goods,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="transno != null">
        transNo = #{transno,jdbcType=VARCHAR},
      </if>
      <if test="channeltransno != null">
        channelTransNo = #{channeltransno,jdbcType=VARCHAR},
      </if>
      <if test="transtime != null">
        transTime = #{transtime,jdbcType=TIMESTAMP},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelfee != null">
        channelFee = #{channelfee,jdbcType=DECIMAL},
      </if>
      <if test="mercfee != null">
        mercFee = #{mercfee,jdbcType=DECIMAL},
      </if>
      <if test="cashfee != null">
        cashFee = #{cashfee,jdbcType=DECIMAL},
      </if>
      <if test="paydata != null">
        payData = #{paydata,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null">
        createDate = #{createdate,jdbcType=DATE},
      </if>
      <if test="profitfee != null">
        profitFee = #{profitfee,jdbcType=DECIMAL},
      </if>
      <if test="payusercity != null">
        payUserCity = #{payusercity,jdbcType=VARCHAR},
      </if>
      <if test="subject != null">
        subject = #{subject,jdbcType=VARCHAR},
      </if>
      <if test="mercorderno != null">
        mercOrderNo = #{mercorderno,jdbcType=VARCHAR},
      </if>
      <if test="mercnotifyurl != null">
        mercNotifyUrl = #{mercnotifyurl,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptOrder">
    update tb_pluss_jft_receipt_order
    set rid = #{rid,jdbcType=INTEGER},
      amount = #{amount,jdbcType=DECIMAL},
      status = #{status,jdbcType=VARCHAR},
      payType = #{paytype,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      userId = #{userid,jdbcType=INTEGER},
      merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      payUserId = #{payuserid,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      goods = #{goods,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      transNo = #{transno,jdbcType=VARCHAR},
      channelTransNo = #{channeltransno,jdbcType=VARCHAR},
      transTime = #{transtime,jdbcType=TIMESTAMP},
      rate = #{rate,jdbcType=INTEGER},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      channelFee = #{channelfee,jdbcType=DECIMAL},
      mercFee = #{mercfee,jdbcType=DECIMAL},
      cashFee = #{cashfee,jdbcType=DECIMAL},
      payData = #{paydata,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createDate = #{createdate,jdbcType=DATE},
      profitFee = #{profitfee,jdbcType=DECIMAL},
      payUserCity = #{payusercity,jdbcType=VARCHAR},
      subject = #{subject,jdbcType=VARCHAR},
      mercOrderNo = #{mercorderno,jdbcType=VARCHAR},
      mercNotifyUrl = #{mercnotifyurl,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>