<?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.TbPlussMemberOrderMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMemberOrder">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="storeId" jdbcType="VARCHAR" property="storeid" />
    <result column="storeName" jdbcType="VARCHAR" property="storename" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="memberCode" jdbcType="VARCHAR" property="membercode" />
    <result column="nickName" jdbcType="VARCHAR" property="nickname" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="orderType" jdbcType="VARCHAR" property="ordertype" />
    <result column="orderFee" jdbcType="VARCHAR" property="orderfee" />
    <result column="orderStatus" jdbcType="VARCHAR" property="orderstatus" />
    <result column="rechargeType" jdbcType="VARCHAR" property="rechargetype" />
    <result column="staffCode" jdbcType="VARCHAR" property="staffcode" />
    <result column="staffName" jdbcType="VARCHAR" property="staffname" />
    <result column="leshuaTransNo" jdbcType="VARCHAR" property="leshuatransno" />
    <result column="weChatTransNo" jdbcType="VARCHAR" property="wechattransno" />
    <result column="aliPayTransNo" jdbcType="VARCHAR" property="alipaytransno" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="channelNo" jdbcType="VARCHAR" property="channelno" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, storeId, storeName, orderNumber, memberCode, nickName, 
    createDt, orderType, orderFee, orderStatus, rechargeType, staffCode, staffName, leshuaTransNo, 
    weChatTransNo, aliPayTransNo, remark, channelNo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_member_order
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_member_order
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberOrder">
    insert into tb_pluss_member_order (id, merchantCode, merchantName, 
      storeId, storeName, orderNumber, 
      memberCode, nickName, createDt, 
      orderType, orderFee, orderStatus, 
      rechargeType, staffCode, staffName, 
      leshuaTransNo, weChatTransNo, aliPayTransNo, 
      remark, channelNo)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{storeid,jdbcType=VARCHAR}, #{storename,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, 
      #{membercode,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{ordertype,jdbcType=VARCHAR}, #{orderfee,jdbcType=VARCHAR}, #{orderstatus,jdbcType=VARCHAR}, 
      #{rechargetype,jdbcType=VARCHAR}, #{staffcode,jdbcType=VARCHAR}, #{staffname,jdbcType=VARCHAR}, 
      #{leshuatransno,jdbcType=VARCHAR}, #{wechattransno,jdbcType=VARCHAR}, #{alipaytransno,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{channelno,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberOrder">
    insert into tb_pluss_member_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="storeid != null">
        storeId,
      </if>
      <if test="storename != null">
        storeName,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="membercode != null">
        memberCode,
      </if>
      <if test="nickname != null">
        nickName,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="ordertype != null">
        orderType,
      </if>
      <if test="orderfee != null">
        orderFee,
      </if>
      <if test="orderstatus != null">
        orderStatus,
      </if>
      <if test="rechargetype != null">
        rechargeType,
      </if>
      <if test="staffcode != null">
        staffCode,
      </if>
      <if test="staffname != null">
        staffName,
      </if>
      <if test="leshuatransno != null">
        leshuaTransNo,
      </if>
      <if test="wechattransno != null">
        weChatTransNo,
      </if>
      <if test="alipaytransno != null">
        aliPayTransNo,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="channelno != null">
        channelNo,
      </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="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="storename != null">
        #{storename,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="membercode != null">
        #{membercode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="ordertype != null">
        #{ordertype,jdbcType=VARCHAR},
      </if>
      <if test="orderfee != null">
        #{orderfee,jdbcType=VARCHAR},
      </if>
      <if test="orderstatus != null">
        #{orderstatus,jdbcType=VARCHAR},
      </if>
      <if test="rechargetype != null">
        #{rechargetype,jdbcType=VARCHAR},
      </if>
      <if test="staffcode != null">
        #{staffcode,jdbcType=VARCHAR},
      </if>
      <if test="staffname != null">
        #{staffname,jdbcType=VARCHAR},
      </if>
      <if test="leshuatransno != null">
        #{leshuatransno,jdbcType=VARCHAR},
      </if>
      <if test="wechattransno != null">
        #{wechattransno,jdbcType=VARCHAR},
      </if>
      <if test="alipaytransno != null">
        #{alipaytransno,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        #{channelno,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberOrder">
    update tb_pluss_member_order
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        storeId = #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="storename != null">
        storeName = #{storename,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="membercode != null">
        memberCode = #{membercode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        nickName = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="ordertype != null">
        orderType = #{ordertype,jdbcType=VARCHAR},
      </if>
      <if test="orderfee != null">
        orderFee = #{orderfee,jdbcType=VARCHAR},
      </if>
      <if test="orderstatus != null">
        orderStatus = #{orderstatus,jdbcType=VARCHAR},
      </if>
      <if test="rechargetype != null">
        rechargeType = #{rechargetype,jdbcType=VARCHAR},
      </if>
      <if test="staffcode != null">
        staffCode = #{staffcode,jdbcType=VARCHAR},
      </if>
      <if test="staffname != null">
        staffName = #{staffname,jdbcType=VARCHAR},
      </if>
      <if test="leshuatransno != null">
        leshuaTransNo = #{leshuatransno,jdbcType=VARCHAR},
      </if>
      <if test="wechattransno != null">
        weChatTransNo = #{wechattransno,jdbcType=VARCHAR},
      </if>
      <if test="alipaytransno != null">
        aliPayTransNo = #{alipaytransno,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        channelNo = #{channelno,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberOrder">
    update tb_pluss_member_order
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      storeId = #{storeid,jdbcType=VARCHAR},
      storeName = #{storename,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      memberCode = #{membercode,jdbcType=VARCHAR},
      nickName = #{nickname,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      orderType = #{ordertype,jdbcType=VARCHAR},
      orderFee = #{orderfee,jdbcType=VARCHAR},
      orderStatus = #{orderstatus,jdbcType=VARCHAR},
      rechargeType = #{rechargetype,jdbcType=VARCHAR},
      staffCode = #{staffcode,jdbcType=VARCHAR},
      staffName = #{staffname,jdbcType=VARCHAR},
      leshuaTransNo = #{leshuatransno,jdbcType=VARCHAR},
      weChatTransNo = #{wechattransno,jdbcType=VARCHAR},
      aliPayTransNo = #{alipaytransno,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      channelNo = #{channelno,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>