<?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.TbPlussInviteRateMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussInviteRate">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="number" jdbcType="INTEGER" property="number" />
    <result column="rate" jdbcType="DECIMAL" property="rate" />
    <result column="startTime" jdbcType="TIMESTAMP" property="starttime" />
    <result column="endTime" jdbcType="TIMESTAMP" property="endtime" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="actId" jdbcType="INTEGER" property="actid" />
    <result column="actName" jdbcType="VARCHAR" property="actname" />
  </resultMap>
  <sql id="Base_Column_List">
    id, number, rate, startTime, endTime, createTime, updateTime, type, actId, actName
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_invite_rate
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_invite_rate
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussInviteRate">
    insert into tb_pluss_invite_rate (id, number, rate, 
      startTime, endTime, createTime, 
      updateTime, type, actId, 
      actName)
    values (#{id,jdbcType=INTEGER}, #{number,jdbcType=INTEGER}, #{rate,jdbcType=DECIMAL}, 
      #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{createtime,jdbcType=TIMESTAMP}, 
      #{updatetime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR}, #{actid,jdbcType=INTEGER}, 
      #{actname,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussInviteRate">
    insert into tb_pluss_invite_rate
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="number != null">
        number,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="starttime != null">
        startTime,
      </if>
      <if test="endtime != null">
        endTime,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="actid != null">
        actId,
      </if>
      <if test="actname != null">
        actName,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="number != null">
        #{number,jdbcType=INTEGER},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=DECIMAL},
      </if>
      <if test="starttime != null">
        #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="actid != null">
        #{actid,jdbcType=INTEGER},
      </if>
      <if test="actname != null">
        #{actname,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussInviteRate">
    update tb_pluss_invite_rate
    <set>
      <if test="number != null">
        number = #{number,jdbcType=INTEGER},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=DECIMAL},
      </if>
      <if test="starttime != null">
        startTime = #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        endTime = #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="actid != null">
        actId = #{actid,jdbcType=INTEGER},
      </if>
      <if test="actname != null">
        actName = #{actname,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussInviteRate">
    update tb_pluss_invite_rate
    set number = #{number,jdbcType=INTEGER},
      rate = #{rate,jdbcType=DECIMAL},
      startTime = #{starttime,jdbcType=TIMESTAMP},
      endTime = #{endtime,jdbcType=TIMESTAMP},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      type = #{type,jdbcType=VARCHAR},
      actId = #{actid,jdbcType=INTEGER},
      actName = #{actname,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>