<?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.TbPlussLevelOperateRecordMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussLevelOperateRecord">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="operator" jdbcType="INTEGER" property="operator" />
    <result column="levelCode" jdbcType="VARCHAR" property="levelcode" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="createMonth" jdbcType="VARCHAR" property="createmonth" />
    <result column="flag" jdbcType="VARCHAR" property="flag" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, operator, levelCode, createTime, updateTime, createMonth, flag
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_level_operate_record
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_level_operate_record
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevelOperateRecord">
    insert into tb_pluss_level_operate_record (id, userId, operator, 
      levelCode, createTime, updateTime, 
      createMonth, flag)
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{operator,jdbcType=INTEGER}, 
      #{levelcode,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{createmonth,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevelOperateRecord">
    insert into tb_pluss_level_operate_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="operator != null">
        operator,
      </if>
      <if test="levelcode != null">
        levelCode,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="createmonth != null">
        createMonth,
      </if>
      <if test="flag != null">
        flag,
      </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="operator != null">
        #{operator,jdbcType=INTEGER},
      </if>
      <if test="levelcode != null">
        #{levelcode,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="createmonth != null">
        #{createmonth,jdbcType=VARCHAR},
      </if>
      <if test="flag != null">
        #{flag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevelOperateRecord">
    update tb_pluss_level_operate_record
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="operator != null">
        operator = #{operator,jdbcType=INTEGER},
      </if>
      <if test="levelcode != null">
        levelCode = #{levelcode,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="createmonth != null">
        createMonth = #{createmonth,jdbcType=VARCHAR},
      </if>
      <if test="flag != null">
        flag = #{flag,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLevelOperateRecord">
    update tb_pluss_level_operate_record
    set userId = #{userid,jdbcType=INTEGER},
      operator = #{operator,jdbcType=INTEGER},
      levelCode = #{levelcode,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      createMonth = #{createmonth,jdbcType=VARCHAR},
      flag = #{flag,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>