<?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.TbPlussLevelMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussLevel">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="level" jdbcType="INTEGER" property="level" />
    <result column="tradeMoney" jdbcType="DOUBLE" property="trademoney" />
    <result column="authCount" jdbcType="INTEGER" property="authcount" />
    <result column="levelName" jdbcType="VARCHAR" property="levelname" />
    <result column="rate" jdbcType="DOUBLE" property="rate" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
  </resultMap>
  <sql id="Base_Column_List">
    id, level, tradeMoney, authCount, levelName, rate, createDt, logo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_level
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_level
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevel">
    insert into tb_pluss_level (id, level, tradeMoney, 
      authCount, levelName, rate, 
      createDt, logo)
    values (#{id,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{trademoney,jdbcType=DOUBLE}, 
      #{authcount,jdbcType=INTEGER}, #{levelname,jdbcType=VARCHAR}, #{rate,jdbcType=DOUBLE}, 
      #{createdt,jdbcType=TIMESTAMP}, #{logo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevel">
    insert into tb_pluss_level
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="level != null">
        level,
      </if>
      <if test="trademoney != null">
        tradeMoney,
      </if>
      <if test="authcount != null">
        authCount,
      </if>
      <if test="levelname != null">
        levelName,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="logo != null">
        logo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="level != null">
        #{level,jdbcType=INTEGER},
      </if>
      <if test="trademoney != null">
        #{trademoney,jdbcType=DOUBLE},
      </if>
      <if test="authcount != null">
        #{authcount,jdbcType=INTEGER},
      </if>
      <if test="levelname != null">
        #{levelname,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=DOUBLE},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevel">
    update tb_pluss_level
    <set>
      <if test="level != null">
        level = #{level,jdbcType=INTEGER},
      </if>
      <if test="trademoney != null">
        tradeMoney = #{trademoney,jdbcType=DOUBLE},
      </if>
      <if test="authcount != null">
        authCount = #{authcount,jdbcType=INTEGER},
      </if>
      <if test="levelname != null">
        levelName = #{levelname,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=DOUBLE},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevel">
    update tb_pluss_level
    set level = #{level,jdbcType=INTEGER},
      tradeMoney = #{trademoney,jdbcType=DOUBLE},
      authCount = #{authcount,jdbcType=INTEGER},
      levelName = #{levelname,jdbcType=VARCHAR},
      rate = #{rate,jdbcType=DOUBLE},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      logo = #{logo,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>