<?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.TbPlussUserRewardInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussUserRewardInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="areaLevel" jdbcType="INTEGER" property="arealevel" />
    <result column="areaNo" jdbcType="VARCHAR" property="areano" />
    <result column="areaName" jdbcType="VARCHAR" property="areaname" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="reId" jdbcType="INTEGER" property="reid" />
    <result column="rName" jdbcType="VARCHAR" property="rname" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, phone, areaLevel, areaNo, areaName, status, reId, rName, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_user_reward_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_user_reward_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserRewardInfo">
    insert into tb_pluss_user_reward_info (id, userId, phone, 
      areaLevel, areaNo, areaName, 
      status, reId, rName, 
      createTime)
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{phone,jdbcType=VARCHAR}, 
      #{arealevel,jdbcType=INTEGER}, #{areano,jdbcType=VARCHAR}, #{areaname,jdbcType=VARCHAR}, 
      #{status,jdbcType=INTEGER}, #{reid,jdbcType=INTEGER}, #{rname,jdbcType=VARCHAR}, 
      #{createtime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserRewardInfo">
    insert into tb_pluss_user_reward_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="arealevel != null">
        areaLevel,
      </if>
      <if test="areano != null">
        areaNo,
      </if>
      <if test="areaname != null">
        areaName,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="reid != null">
        reId,
      </if>
      <if test="rname != null">
        rName,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="arealevel != null">
        #{arealevel,jdbcType=INTEGER},
      </if>
      <if test="areano != null">
        #{areano,jdbcType=VARCHAR},
      </if>
      <if test="areaname != null">
        #{areaname,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="reid != null">
        #{reid,jdbcType=INTEGER},
      </if>
      <if test="rname != null">
        #{rname,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserRewardInfo">
    update tb_pluss_user_reward_info
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="arealevel != null">
        areaLevel = #{arealevel,jdbcType=INTEGER},
      </if>
      <if test="areano != null">
        areaNo = #{areano,jdbcType=VARCHAR},
      </if>
      <if test="areaname != null">
        areaName = #{areaname,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="reid != null">
        reId = #{reid,jdbcType=INTEGER},
      </if>
      <if test="rname != null">
        rName = #{rname,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserRewardInfo">
    update tb_pluss_user_reward_info
    set userId = #{userid,jdbcType=INTEGER},
      phone = #{phone,jdbcType=VARCHAR},
      areaLevel = #{arealevel,jdbcType=INTEGER},
      areaNo = #{areano,jdbcType=VARCHAR},
      areaName = #{areaname,jdbcType=VARCHAR},
      status = #{status,jdbcType=INTEGER},
      reId = #{reid,jdbcType=INTEGER},
      rName = #{rname,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>