<?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.TbPlussDayStatisticsMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDayStatistics">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="consumeFee" jdbcType="DECIMAL" property="consumefee" />
    <result column="consumeFeeZFB" jdbcType="DECIMAL" property="consumefeezfb" />
    <result column="consumeFeeWX" jdbcType="DECIMAL" property="consumefeewx" />
    <result column="consumeFeeYL" jdbcType="DECIMAL" property="consumefeeyl" />
    <result column="count" jdbcType="INTEGER" property="count" />
    <result column="countZFB" jdbcType="INTEGER" property="countzfb" />
    <result column="countWX" jdbcType="INTEGER" property="countwx" />
    <result column="countYL" jdbcType="INTEGER" property="countyl" />
    <result column="refundFee" jdbcType="DECIMAL" property="refundfee" />
    <result column="refundFeeZFB" jdbcType="DECIMAL" property="refundfeezfb" />
    <result column="refundFeeWX" jdbcType="DECIMAL" property="refundfeewx" />
    <result column="refundFeeYL" jdbcType="DECIMAL" property="refundfeeyl" />
    <result column="newCount" jdbcType="INTEGER" property="newcount" />
    <result column="newCountStore" jdbcType="INTEGER" property="newcountstore" />
    <result column="newCountMember" jdbcType="INTEGER" property="newcountmember" />
    <result column="newCountReg" jdbcType="INTEGER" property="newcountreg" />
    <result column="profitSum" jdbcType="DECIMAL" property="profitsum" />
    <result column="profitSpread" jdbcType="DECIMAL" property="profitspread" />
    <result column="profitFans" jdbcType="DECIMAL" property="profitfans" />
    <result column="profitCompany" jdbcType="DECIMAL" property="profitcompany" />
    <result column="date" jdbcType="DATE" property="date" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, consumeFee, consumeFeeZFB, consumeFeeWX, consumeFeeYL, count, countZFB, countWX, 
    countYL, refundFee, refundFeeZFB, refundFeeWX, refundFeeYL, newCount, newCountStore, 
    newCountMember, newCountReg, profitSum, profitSpread, profitFans, profitCompany, 
    date, createTime, updateTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_day_statistics
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_day_statistics
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDayStatistics">
    insert into tb_pluss_day_statistics (id, consumeFee, consumeFeeZFB, 
      consumeFeeWX, consumeFeeYL, count, 
      countZFB, countWX, countYL, 
      refundFee, refundFeeZFB, refundFeeWX, 
      refundFeeYL, newCount, newCountStore, 
      newCountMember, newCountReg, profitSum, 
      profitSpread, profitFans, profitCompany, 
      date, createTime, updateTime
      )
    values (#{id,jdbcType=INTEGER}, #{consumefee,jdbcType=DECIMAL}, #{consumefeezfb,jdbcType=DECIMAL}, 
      #{consumefeewx,jdbcType=DECIMAL}, #{consumefeeyl,jdbcType=DECIMAL}, #{count,jdbcType=INTEGER}, 
      #{countzfb,jdbcType=INTEGER}, #{countwx,jdbcType=INTEGER}, #{countyl,jdbcType=INTEGER}, 
      #{refundfee,jdbcType=DECIMAL}, #{refundfeezfb,jdbcType=DECIMAL}, #{refundfeewx,jdbcType=DECIMAL}, 
      #{refundfeeyl,jdbcType=DECIMAL}, #{newcount,jdbcType=INTEGER}, #{newcountstore,jdbcType=INTEGER}, 
      #{newcountmember,jdbcType=INTEGER}, #{newcountreg,jdbcType=INTEGER}, #{profitsum,jdbcType=DECIMAL}, 
      #{profitspread,jdbcType=DECIMAL}, #{profitfans,jdbcType=DECIMAL}, #{profitcompany,jdbcType=DECIMAL}, 
      #{date,jdbcType=DATE}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDayStatistics">
    insert into tb_pluss_day_statistics
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="consumefee != null">
        consumeFee,
      </if>
      <if test="consumefeezfb != null">
        consumeFeeZFB,
      </if>
      <if test="consumefeewx != null">
        consumeFeeWX,
      </if>
      <if test="consumefeeyl != null">
        consumeFeeYL,
      </if>
      <if test="count != null">
        count,
      </if>
      <if test="countzfb != null">
        countZFB,
      </if>
      <if test="countwx != null">
        countWX,
      </if>
      <if test="countyl != null">
        countYL,
      </if>
      <if test="refundfee != null">
        refundFee,
      </if>
      <if test="refundfeezfb != null">
        refundFeeZFB,
      </if>
      <if test="refundfeewx != null">
        refundFeeWX,
      </if>
      <if test="refundfeeyl != null">
        refundFeeYL,
      </if>
      <if test="newcount != null">
        newCount,
      </if>
      <if test="newcountstore != null">
        newCountStore,
      </if>
      <if test="newcountmember != null">
        newCountMember,
      </if>
      <if test="newcountreg != null">
        newCountReg,
      </if>
      <if test="profitsum != null">
        profitSum,
      </if>
      <if test="profitspread != null">
        profitSpread,
      </if>
      <if test="profitfans != null">
        profitFans,
      </if>
      <if test="profitcompany != null">
        profitCompany,
      </if>
      <if test="date != null">
        date,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="consumefee != null">
        #{consumefee,jdbcType=DECIMAL},
      </if>
      <if test="consumefeezfb != null">
        #{consumefeezfb,jdbcType=DECIMAL},
      </if>
      <if test="consumefeewx != null">
        #{consumefeewx,jdbcType=DECIMAL},
      </if>
      <if test="consumefeeyl != null">
        #{consumefeeyl,jdbcType=DECIMAL},
      </if>
      <if test="count != null">
        #{count,jdbcType=INTEGER},
      </if>
      <if test="countzfb != null">
        #{countzfb,jdbcType=INTEGER},
      </if>
      <if test="countwx != null">
        #{countwx,jdbcType=INTEGER},
      </if>
      <if test="countyl != null">
        #{countyl,jdbcType=INTEGER},
      </if>
      <if test="refundfee != null">
        #{refundfee,jdbcType=DECIMAL},
      </if>
      <if test="refundfeezfb != null">
        #{refundfeezfb,jdbcType=DECIMAL},
      </if>
      <if test="refundfeewx != null">
        #{refundfeewx,jdbcType=DECIMAL},
      </if>
      <if test="refundfeeyl != null">
        #{refundfeeyl,jdbcType=DECIMAL},
      </if>
      <if test="newcount != null">
        #{newcount,jdbcType=INTEGER},
      </if>
      <if test="newcountstore != null">
        #{newcountstore,jdbcType=INTEGER},
      </if>
      <if test="newcountmember != null">
        #{newcountmember,jdbcType=INTEGER},
      </if>
      <if test="newcountreg != null">
        #{newcountreg,jdbcType=INTEGER},
      </if>
      <if test="profitsum != null">
        #{profitsum,jdbcType=DECIMAL},
      </if>
      <if test="profitspread != null">
        #{profitspread,jdbcType=DECIMAL},
      </if>
      <if test="profitfans != null">
        #{profitfans,jdbcType=DECIMAL},
      </if>
      <if test="profitcompany != null">
        #{profitcompany,jdbcType=DECIMAL},
      </if>
      <if test="date != null">
        #{date,jdbcType=DATE},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDayStatistics">
    update tb_pluss_day_statistics
    <set>
      <if test="consumefee != null">
        consumeFee = #{consumefee,jdbcType=DECIMAL},
      </if>
      <if test="consumefeezfb != null">
        consumeFeeZFB = #{consumefeezfb,jdbcType=DECIMAL},
      </if>
      <if test="consumefeewx != null">
        consumeFeeWX = #{consumefeewx,jdbcType=DECIMAL},
      </if>
      <if test="consumefeeyl != null">
        consumeFeeYL = #{consumefeeyl,jdbcType=DECIMAL},
      </if>
      <if test="count != null">
        count = #{count,jdbcType=INTEGER},
      </if>
      <if test="countzfb != null">
        countZFB = #{countzfb,jdbcType=INTEGER},
      </if>
      <if test="countwx != null">
        countWX = #{countwx,jdbcType=INTEGER},
      </if>
      <if test="countyl != null">
        countYL = #{countyl,jdbcType=INTEGER},
      </if>
      <if test="refundfee != null">
        refundFee = #{refundfee,jdbcType=DECIMAL},
      </if>
      <if test="refundfeezfb != null">
        refundFeeZFB = #{refundfeezfb,jdbcType=DECIMAL},
      </if>
      <if test="refundfeewx != null">
        refundFeeWX = #{refundfeewx,jdbcType=DECIMAL},
      </if>
      <if test="refundfeeyl != null">
        refundFeeYL = #{refundfeeyl,jdbcType=DECIMAL},
      </if>
      <if test="newcount != null">
        newCount = #{newcount,jdbcType=INTEGER},
      </if>
      <if test="newcountstore != null">
        newCountStore = #{newcountstore,jdbcType=INTEGER},
      </if>
      <if test="newcountmember != null">
        newCountMember = #{newcountmember,jdbcType=INTEGER},
      </if>
      <if test="newcountreg != null">
        newCountReg = #{newcountreg,jdbcType=INTEGER},
      </if>
      <if test="profitsum != null">
        profitSum = #{profitsum,jdbcType=DECIMAL},
      </if>
      <if test="profitspread != null">
        profitSpread = #{profitspread,jdbcType=DECIMAL},
      </if>
      <if test="profitfans != null">
        profitFans = #{profitfans,jdbcType=DECIMAL},
      </if>
      <if test="profitcompany != null">
        profitCompany = #{profitcompany,jdbcType=DECIMAL},
      </if>
      <if test="date != null">
        date = #{date,jdbcType=DATE},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDayStatistics">
    update tb_pluss_day_statistics
    set consumeFee = #{consumefee,jdbcType=DECIMAL},
      consumeFeeZFB = #{consumefeezfb,jdbcType=DECIMAL},
      consumeFeeWX = #{consumefeewx,jdbcType=DECIMAL},
      consumeFeeYL = #{consumefeeyl,jdbcType=DECIMAL},
      count = #{count,jdbcType=INTEGER},
      countZFB = #{countzfb,jdbcType=INTEGER},
      countWX = #{countwx,jdbcType=INTEGER},
      countYL = #{countyl,jdbcType=INTEGER},
      refundFee = #{refundfee,jdbcType=DECIMAL},
      refundFeeZFB = #{refundfeezfb,jdbcType=DECIMAL},
      refundFeeWX = #{refundfeewx,jdbcType=DECIMAL},
      refundFeeYL = #{refundfeeyl,jdbcType=DECIMAL},
      newCount = #{newcount,jdbcType=INTEGER},
      newCountStore = #{newcountstore,jdbcType=INTEGER},
      newCountMember = #{newcountmember,jdbcType=INTEGER},
      newCountReg = #{newcountreg,jdbcType=INTEGER},
      profitSum = #{profitsum,jdbcType=DECIMAL},
      profitSpread = #{profitspread,jdbcType=DECIMAL},
      profitFans = #{profitfans,jdbcType=DECIMAL},
      profitCompany = #{profitcompany,jdbcType=DECIMAL},
      date = #{date,jdbcType=DATE},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>