<?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.TbPlussFansConsumReturnMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussFansConsumReturn">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
    <result column="nickName" jdbcType="VARCHAR" property="nickname" />
    <result column="consumMony" jdbcType="DOUBLE" property="consummony" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="returnMoney" jdbcType="DOUBLE" property="returnmoney" />
    <result column="consumTime" jdbcType="TIMESTAMP" property="consumtime" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
  </resultMap>
  <sql id="Base_Column_List">
    id, logo, nickName, consumMony, merchantCode, merchantName, returnMoney, consumTime, 
    orderNumber, createDt
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_fans_consum_return
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_fans_consum_return
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFansConsumReturn">
    insert into tb_pluss_fans_consum_return (id, logo, nickName, 
      consumMony, merchantCode, merchantName, 
      returnMoney, consumTime, orderNumber, 
      createDt)
    values (#{id,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, 
      #{consummony,jdbcType=DOUBLE}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{returnmoney,jdbcType=DOUBLE}, #{consumtime,jdbcType=TIMESTAMP}, #{ordernumber,jdbcType=VARCHAR}, 
      #{createdt,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFansConsumReturn">
    insert into tb_pluss_fans_consum_return
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="logo != null">
        logo,
      </if>
      <if test="nickname != null">
        nickName,
      </if>
      <if test="consummony != null">
        consumMony,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="returnmoney != null">
        returnMoney,
      </if>
      <if test="consumtime != null">
        consumTime,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="consummony != null">
        #{consummony,jdbcType=DOUBLE},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="returnmoney != null">
        #{returnmoney,jdbcType=DOUBLE},
      </if>
      <if test="consumtime != null">
        #{consumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFansConsumReturn">
    update tb_pluss_fans_consum_return
    <set>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        nickName = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="consummony != null">
        consumMony = #{consummony,jdbcType=DOUBLE},
      </if>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="returnmoney != null">
        returnMoney = #{returnmoney,jdbcType=DOUBLE},
      </if>
      <if test="consumtime != null">
        consumTime = #{consumtime,jdbcType=TIMESTAMP},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussFansConsumReturn">
    update tb_pluss_fans_consum_return
    set logo = #{logo,jdbcType=VARCHAR},
      nickName = #{nickname,jdbcType=VARCHAR},
      consumMony = #{consummony,jdbcType=DOUBLE},
      merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      returnMoney = #{returnmoney,jdbcType=DOUBLE},
      consumTime = #{consumtime,jdbcType=TIMESTAMP},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>