<?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.TbPlussFansMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussFans">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="VARCHAR" property="userid" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
    <result column="nickName" jdbcType="VARCHAR" property="nickname" />
    <result column="consumMoney" jdbcType="DOUBLE" property="consummoney" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="lastMerchantCode" jdbcType="VARCHAR" property="lastmerchantcode" />
    <result column="shareMoney" jdbcType="VARCHAR" property="sharemoney" />
    <result column="consumAddress" jdbcType="VARCHAR" property="consumaddress" />
    <result column="consumTime" jdbcType="TIMESTAMP" property="consumtime" />
    <result column="lastconsumTime" jdbcType="TIMESTAMP" property="lastconsumtime" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="lastOrderNumber" jdbcType="VARCHAR" property="lastordernumber" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="payWay" jdbcType="VARCHAR" property="payway" />
    <result column="isUse" jdbcType="VARCHAR" property="isuse" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, logo, nickName, consumMoney, merchantCode, merchantName, lastMerchantCode, 
    shareMoney, consumAddress, consumTime, lastconsumTime, orderNumber, lastOrderNumber, 
    createDt, payWay, isUse
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_fans
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_fans
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFans">
    insert into tb_pluss_fans (id, userId, logo, 
      nickName, consumMoney, merchantCode, 
      merchantName, lastMerchantCode, shareMoney, 
      consumAddress, consumTime, lastconsumTime, 
      orderNumber, lastOrderNumber, createDt, 
      payWay, isUse)
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, 
      #{nickname,jdbcType=VARCHAR}, #{consummoney,jdbcType=DOUBLE}, #{merchantcode,jdbcType=VARCHAR}, 
      #{merchantname,jdbcType=VARCHAR}, #{lastmerchantcode,jdbcType=VARCHAR}, #{sharemoney,jdbcType=VARCHAR}, 
      #{consumaddress,jdbcType=VARCHAR}, #{consumtime,jdbcType=TIMESTAMP}, #{lastconsumtime,jdbcType=TIMESTAMP}, 
      #{ordernumber,jdbcType=VARCHAR}, #{lastordernumber,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{payway,jdbcType=VARCHAR}, #{isuse,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFans">
    insert into tb_pluss_fans
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="logo != null">
        logo,
      </if>
      <if test="nickname != null">
        nickName,
      </if>
      <if test="consummoney != null">
        consumMoney,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="lastmerchantcode != null">
        lastMerchantCode,
      </if>
      <if test="sharemoney != null">
        shareMoney,
      </if>
      <if test="consumaddress != null">
        consumAddress,
      </if>
      <if test="consumtime != null">
        consumTime,
      </if>
      <if test="lastconsumtime != null">
        lastconsumTime,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="lastordernumber != null">
        lastOrderNumber,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="payway != null">
        payWay,
      </if>
      <if test="isuse != null">
        isUse,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=VARCHAR},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="consummoney != null">
        #{consummoney,jdbcType=DOUBLE},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="lastmerchantcode != null">
        #{lastmerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="sharemoney != null">
        #{sharemoney,jdbcType=VARCHAR},
      </if>
      <if test="consumaddress != null">
        #{consumaddress,jdbcType=VARCHAR},
      </if>
      <if test="consumtime != null">
        #{consumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastconsumtime != null">
        #{lastconsumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="lastordernumber != null">
        #{lastordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="payway != null">
        #{payway,jdbcType=VARCHAR},
      </if>
      <if test="isuse != null">
        #{isuse,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFans">
    update tb_pluss_fans
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=VARCHAR},
      </if>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        nickName = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="consummoney != null">
        consumMoney = #{consummoney,jdbcType=DOUBLE},
      </if>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="lastmerchantcode != null">
        lastMerchantCode = #{lastmerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="sharemoney != null">
        shareMoney = #{sharemoney,jdbcType=VARCHAR},
      </if>
      <if test="consumaddress != null">
        consumAddress = #{consumaddress,jdbcType=VARCHAR},
      </if>
      <if test="consumtime != null">
        consumTime = #{consumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastconsumtime != null">
        lastconsumTime = #{lastconsumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="lastordernumber != null">
        lastOrderNumber = #{lastordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="payway != null">
        payWay = #{payway,jdbcType=VARCHAR},
      </if>
      <if test="isuse != null">
        isUse = #{isuse,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFans">
    update tb_pluss_fans
    set userId = #{userid,jdbcType=VARCHAR},
      logo = #{logo,jdbcType=VARCHAR},
      nickName = #{nickname,jdbcType=VARCHAR},
      consumMoney = #{consummoney,jdbcType=DOUBLE},
      merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      lastMerchantCode = #{lastmerchantcode,jdbcType=VARCHAR},
      shareMoney = #{sharemoney,jdbcType=VARCHAR},
      consumAddress = #{consumaddress,jdbcType=VARCHAR},
      consumTime = #{consumtime,jdbcType=TIMESTAMP},
      lastconsumTime = #{lastconsumtime,jdbcType=TIMESTAMP},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      lastOrderNumber = #{lastordernumber,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      payWay = #{payway,jdbcType=VARCHAR},
      isUse = #{isuse,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>