<?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.TbPlussDeviceMerchantBuyMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDeviceMerchantBuy">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="transNo" jdbcType="VARCHAR" property="transno" />
    <result column="orderAmount" jdbcType="DOUBLE" property="orderamount" />
    <result column="quantity" jdbcType="INTEGER" property="quantity" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="venderCode" jdbcType="VARCHAR" property="vendercode" />
    <result column="venderModel" jdbcType="VARCHAR" property="vendermodel" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="payCode" jdbcType="VARCHAR" property="paycode" />
    <result column="payName" jdbcType="VARCHAR" property="payname" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="transDt" jdbcType="TIMESTAMP" property="transdt" />
    <result column="refundNo" jdbcType="VARCHAR" property="refundno" />
    <result column="refundDt" jdbcType="TIMESTAMP" property="refunddt" />
    <result column="expressNo" jdbcType="VARCHAR" property="expressno" />
    <result column="provinces" jdbcType="VARCHAR" property="provinces" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="linkName" jdbcType="VARCHAR" property="linkname" />
    <result column="linkPhone" jdbcType="VARCHAR" property="linkphone" />
    <result column="email" jdbcType="VARCHAR" property="email" />
    <result column="actStatus" jdbcType="VARCHAR" property="actstatus" />
    <result column="snNo" jdbcType="VARCHAR" property="snno" />
    <result column="logistNo" jdbcType="VARCHAR" property="logistno" />
  </resultMap>
  <sql id="Base_Column_List">
    id, orderNo, transNo, orderAmount, quantity, merchantCode, merchantName, venderCode, 
    venderModel, status, payCode, payName, createDt, transDt, refundNo, refundDt, expressNo, 
    provinces, address, linkName, linkPhone, email, actStatus, snNo, logistNo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_device_merchant_buy
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_device_merchant_buy
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceMerchantBuy">
    insert into tb_pluss_device_merchant_buy (id, orderNo, transNo, 
      orderAmount, quantity, merchantCode, 
      merchantName, venderCode, venderModel, 
      status, payCode, payName, 
      createDt, transDt, refundNo, 
      refundDt, expressNo, provinces, 
      address, linkName, linkPhone, 
      email, actStatus, snNo, 
      logistNo)
    values (#{id,jdbcType=INTEGER}, #{orderno,jdbcType=VARCHAR}, #{transno,jdbcType=VARCHAR}, 
      #{orderamount,jdbcType=DOUBLE}, #{quantity,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, 
      #{merchantname,jdbcType=VARCHAR}, #{vendercode,jdbcType=VARCHAR}, #{vendermodel,jdbcType=VARCHAR}, 
      #{status,jdbcType=VARCHAR}, #{paycode,jdbcType=VARCHAR}, #{payname,jdbcType=VARCHAR}, 
      #{createdt,jdbcType=TIMESTAMP}, #{transdt,jdbcType=TIMESTAMP}, #{refundno,jdbcType=VARCHAR}, 
      #{refunddt,jdbcType=TIMESTAMP}, #{expressno,jdbcType=VARCHAR}, #{provinces,jdbcType=VARCHAR}, 
      #{address,jdbcType=VARCHAR}, #{linkname,jdbcType=VARCHAR}, #{linkphone,jdbcType=VARCHAR}, 
      #{email,jdbcType=VARCHAR}, #{actstatus,jdbcType=VARCHAR}, #{snno,jdbcType=VARCHAR}, 
      #{logistno,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceMerchantBuy">
    insert into tb_pluss_device_merchant_buy
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="transno != null">
        transNo,
      </if>
      <if test="orderamount != null">
        orderAmount,
      </if>
      <if test="quantity != null">
        quantity,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="vendercode != null">
        venderCode,
      </if>
      <if test="vendermodel != null">
        venderModel,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="paycode != null">
        payCode,
      </if>
      <if test="payname != null">
        payName,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="transdt != null">
        transDt,
      </if>
      <if test="refundno != null">
        refundNo,
      </if>
      <if test="refunddt != null">
        refundDt,
      </if>
      <if test="expressno != null">
        expressNo,
      </if>
      <if test="provinces != null">
        provinces,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="linkname != null">
        linkName,
      </if>
      <if test="linkphone != null">
        linkPhone,
      </if>
      <if test="email != null">
        email,
      </if>
      <if test="actstatus != null">
        actStatus,
      </if>
      <if test="snno != null">
        snNo,
      </if>
      <if test="logistno != null">
        logistNo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="transno != null">
        #{transno,jdbcType=VARCHAR},
      </if>
      <if test="orderamount != null">
        #{orderamount,jdbcType=DOUBLE},
      </if>
      <if test="quantity != null">
        #{quantity,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="vendercode != null">
        #{vendercode,jdbcType=VARCHAR},
      </if>
      <if test="vendermodel != null">
        #{vendermodel,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="paycode != null">
        #{paycode,jdbcType=VARCHAR},
      </if>
      <if test="payname != null">
        #{payname,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="transdt != null">
        #{transdt,jdbcType=TIMESTAMP},
      </if>
      <if test="refundno != null">
        #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="refunddt != null">
        #{refunddt,jdbcType=TIMESTAMP},
      </if>
      <if test="expressno != null">
        #{expressno,jdbcType=VARCHAR},
      </if>
      <if test="provinces != null">
        #{provinces,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="linkname != null">
        #{linkname,jdbcType=VARCHAR},
      </if>
      <if test="linkphone != null">
        #{linkphone,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="actstatus != null">
        #{actstatus,jdbcType=VARCHAR},
      </if>
      <if test="snno != null">
        #{snno,jdbcType=VARCHAR},
      </if>
      <if test="logistno != null">
        #{logistno,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceMerchantBuy">
    update tb_pluss_device_merchant_buy
    <set>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="transno != null">
        transNo = #{transno,jdbcType=VARCHAR},
      </if>
      <if test="orderamount != null">
        orderAmount = #{orderamount,jdbcType=DOUBLE},
      </if>
      <if test="quantity != null">
        quantity = #{quantity,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="vendercode != null">
        venderCode = #{vendercode,jdbcType=VARCHAR},
      </if>
      <if test="vendermodel != null">
        venderModel = #{vendermodel,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="paycode != null">
        payCode = #{paycode,jdbcType=VARCHAR},
      </if>
      <if test="payname != null">
        payName = #{payname,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="transdt != null">
        transDt = #{transdt,jdbcType=TIMESTAMP},
      </if>
      <if test="refundno != null">
        refundNo = #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="refunddt != null">
        refundDt = #{refunddt,jdbcType=TIMESTAMP},
      </if>
      <if test="expressno != null">
        expressNo = #{expressno,jdbcType=VARCHAR},
      </if>
      <if test="provinces != null">
        provinces = #{provinces,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="linkname != null">
        linkName = #{linkname,jdbcType=VARCHAR},
      </if>
      <if test="linkphone != null">
        linkPhone = #{linkphone,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        email = #{email,jdbcType=VARCHAR},
      </if>
      <if test="actstatus != null">
        actStatus = #{actstatus,jdbcType=VARCHAR},
      </if>
      <if test="snno != null">
        snNo = #{snno,jdbcType=VARCHAR},
      </if>
      <if test="logistno != null">
        logistNo = #{logistno,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceMerchantBuy">
    update tb_pluss_device_merchant_buy
    set orderNo = #{orderno,jdbcType=VARCHAR},
      transNo = #{transno,jdbcType=VARCHAR},
      orderAmount = #{orderamount,jdbcType=DOUBLE},
      quantity = #{quantity,jdbcType=INTEGER},
      merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      venderCode = #{vendercode,jdbcType=VARCHAR},
      venderModel = #{vendermodel,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      payCode = #{paycode,jdbcType=VARCHAR},
      payName = #{payname,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      transDt = #{transdt,jdbcType=TIMESTAMP},
      refundNo = #{refundno,jdbcType=VARCHAR},
      refundDt = #{refunddt,jdbcType=TIMESTAMP},
      expressNo = #{expressno,jdbcType=VARCHAR},
      provinces = #{provinces,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      linkName = #{linkname,jdbcType=VARCHAR},
      linkPhone = #{linkphone,jdbcType=VARCHAR},
      email = #{email,jdbcType=VARCHAR},
      actStatus = #{actstatus,jdbcType=VARCHAR},
      snNo = #{snno,jdbcType=VARCHAR},
      logistNo = #{logistno,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>