<?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.TbPlussBestNewActivityMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivity">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="desc" jdbcType="VARCHAR" property="desc" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="updateor" jdbcType="VARCHAR" property="updateor" />
    <result column="seq" jdbcType="INTEGER" property="seq" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivityWithBLOBs">
    <result column="content" jdbcType="LONGVARCHAR" property="content" />
    <result column="imgs" jdbcType="LONGVARCHAR" property="imgs" />
    <result column="url" jdbcType="LONGVARCHAR" property="url" />
  </resultMap>
  <sql id="Base_Column_List">
    id, title, desc, status, type, updateTime, updateor, seq
  </sql>
  <sql id="Blob_Column_List">
    content, imgs, url
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_best_new_activity
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_best_new_activity
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivityWithBLOBs">
    insert into tb_pluss_best_new_activity (id, title, desc, 
      status, type, updateTime, 
      updateor, seq, content, 
      imgs, url)
    values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, 
      #{status,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{updateor,jdbcType=VARCHAR}, #{seq,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}, 
      #{imgs,jdbcType=LONGVARCHAR}, #{url,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivityWithBLOBs">
    insert into tb_pluss_best_new_activity
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="desc != null">
        desc,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="updateor != null">
        updateor,
      </if>
      <if test="seq != null">
        seq,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="imgs != null">
        imgs,
      </if>
      <if test="url != null">
        url,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        #{desc,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateor != null">
        #{updateor,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        #{seq,jdbcType=INTEGER},
      </if>
      <if test="content != null">
        #{content,jdbcType=LONGVARCHAR},
      </if>
      <if test="imgs != null">
        #{imgs,jdbcType=LONGVARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivityWithBLOBs">
    update tb_pluss_best_new_activity
    <set>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        desc = #{desc,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateor != null">
        updateor = #{updateor,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        seq = #{seq,jdbcType=INTEGER},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=LONGVARCHAR},
      </if>
      <if test="imgs != null">
        imgs = #{imgs,jdbcType=LONGVARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivityWithBLOBs">
    update tb_pluss_best_new_activity
    set title = #{title,jdbcType=VARCHAR},
      desc = #{desc,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      updateor = #{updateor,jdbcType=VARCHAR},
      seq = #{seq,jdbcType=INTEGER},
      content = #{content,jdbcType=LONGVARCHAR},
      imgs = #{imgs,jdbcType=LONGVARCHAR},
      url = #{url,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussBestNewActivity">
    update tb_pluss_best_new_activity
    set title = #{title,jdbcType=VARCHAR},
      desc = #{desc,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      updateor = #{updateor,jdbcType=VARCHAR},
      seq = #{seq,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>