<?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.TbPlussMerchantMenberRechargeMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantMenberRecharge">
    <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="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
    <result column="memberCode" jdbcType="VARCHAR" property="membercode" />
    <result column="nickName" jdbcType="VARCHAR" property="nickname" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="rechargeMoney" jdbcType="DOUBLE" property="rechargemoney" />
    <result column="giveMoney" jdbcType="DOUBLE" property="givemoney" />
    <result column="payType" jdbcType="INTEGER" property="paytype" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, storeId, storeName, orderNumber, createDt, logo, 
    memberCode, nickName, phone, rechargeMoney, giveMoney, payType
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_menber_recharge
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_menber_recharge
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMenberRecharge">
    insert into tb_pluss_merchant_menber_recharge (id, merchantCode, merchantName, 
      storeId, storeName, orderNumber, 
      createDt, logo, memberCode, 
      nickName, phone, rechargeMoney, 
      giveMoney, payType)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{storeid,jdbcType=VARCHAR}, #{storename,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, 
      #{createdt,jdbcType=TIMESTAMP}, #{logo,jdbcType=VARCHAR}, #{membercode,jdbcType=VARCHAR}, 
      #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{rechargemoney,jdbcType=DOUBLE}, 
      #{givemoney,jdbcType=DOUBLE}, #{paytype,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMenberRecharge">
    insert into tb_pluss_merchant_menber_recharge
    <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="createdt != null">
        createDt,
      </if>
      <if test="logo != null">
        logo,
      </if>
      <if test="membercode != null">
        memberCode,
      </if>
      <if test="nickname != null">
        nickName,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="rechargemoney != null">
        rechargeMoney,
      </if>
      <if test="givemoney != null">
        giveMoney,
      </if>
      <if test="paytype != null">
        payType,
      </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="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
      <if test="membercode != null">
        #{membercode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="rechargemoney != null">
        #{rechargemoney,jdbcType=DOUBLE},
      </if>
      <if test="givemoney != null">
        #{givemoney,jdbcType=DOUBLE},
      </if>
      <if test="paytype != null">
        #{paytype,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMenberRecharge">
    update tb_pluss_merchant_menber_recharge
    <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="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
      <if test="membercode != null">
        memberCode = #{membercode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        nickName = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="rechargemoney != null">
        rechargeMoney = #{rechargemoney,jdbcType=DOUBLE},
      </if>
      <if test="givemoney != null">
        giveMoney = #{givemoney,jdbcType=DOUBLE},
      </if>
      <if test="paytype != null">
        payType = #{paytype,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantMenberRecharge">
    update tb_pluss_merchant_menber_recharge
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      storeId = #{storeid,jdbcType=VARCHAR},
      storeName = #{storename,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      logo = #{logo,jdbcType=VARCHAR},
      memberCode = #{membercode,jdbcType=VARCHAR},
      nickName = #{nickname,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      rechargeMoney = #{rechargemoney,jdbcType=DOUBLE},
      giveMoney = #{givemoney,jdbcType=DOUBLE},
      payType = #{paytype,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>