<?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.TbPlussRealFansMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussRealFans">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="nickName" jdbcType="VARCHAR" property="nickname" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="soleId" jdbcType="VARCHAR" property="soleid" />
    <result column="aliConsum" jdbcType="VARCHAR" property="aliconsum" />
    <result column="wechatConsum" jdbcType="VARCHAR" property="wechatconsum" />
    <result column="enableMerchantCode" jdbcType="VARCHAR" property="enablemerchantcode" />
    <result column="enableTime" jdbcType="TIMESTAMP" property="enabletime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, nickName, logo, phone, soleId, aliConsum, wechatConsum, enableMerchantCode, enableTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_real_fans
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_real_fans
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRealFans">
    insert into tb_pluss_real_fans (id, nickName, logo, 
      phone, soleId, aliConsum, 
      wechatConsum, enableMerchantCode, enableTime
      )
    values (#{id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, 
      #{phone,jdbcType=VARCHAR}, #{soleid,jdbcType=VARCHAR}, #{aliconsum,jdbcType=VARCHAR}, 
      #{wechatconsum,jdbcType=VARCHAR}, #{enablemerchantcode,jdbcType=VARCHAR}, #{enabletime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRealFans">
    insert into tb_pluss_real_fans
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="nickname != null">
        nickName,
      </if>
      <if test="logo != null">
        logo,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="soleid != null">
        soleId,
      </if>
      <if test="aliconsum != null">
        aliConsum,
      </if>
      <if test="wechatconsum != null">
        wechatConsum,
      </if>
      <if test="enablemerchantcode != null">
        enableMerchantCode,
      </if>
      <if test="enabletime != null">
        enableTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="soleid != null">
        #{soleid,jdbcType=VARCHAR},
      </if>
      <if test="aliconsum != null">
        #{aliconsum,jdbcType=VARCHAR},
      </if>
      <if test="wechatconsum != null">
        #{wechatconsum,jdbcType=VARCHAR},
      </if>
      <if test="enablemerchantcode != null">
        #{enablemerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="enabletime != null">
        #{enabletime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRealFans">
    update tb_pluss_real_fans
    <set>
      <if test="nickname != null">
        nickName = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="soleid != null">
        soleId = #{soleid,jdbcType=VARCHAR},
      </if>
      <if test="aliconsum != null">
        aliConsum = #{aliconsum,jdbcType=VARCHAR},
      </if>
      <if test="wechatconsum != null">
        wechatConsum = #{wechatconsum,jdbcType=VARCHAR},
      </if>
      <if test="enablemerchantcode != null">
        enableMerchantCode = #{enablemerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="enabletime != null">
        enableTime = #{enabletime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRealFans">
    update tb_pluss_real_fans
    set nickName = #{nickname,jdbcType=VARCHAR},
      logo = #{logo,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      soleId = #{soleid,jdbcType=VARCHAR},
      aliConsum = #{aliconsum,jdbcType=VARCHAR},
      wechatConsum = #{wechatconsum,jdbcType=VARCHAR},
      enableMerchantCode = #{enablemerchantcode,jdbcType=VARCHAR},
      enableTime = #{enabletime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>