<?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.TbPlussJftSmallClassMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    <id column="id" jdbcType="TINYINT" property="id" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="describe" jdbcType="VARCHAR" property="describe" />
    <result column="photo" jdbcType="VARCHAR" property="photo" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="status" jdbcType="BIT" property="status" />
    <result column="sort" jdbcType="TINYINT" property="sort" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    <result column="content" jdbcType="LONGVARCHAR" property="content" />
  </resultMap>
  <sql id="Base_Column_List">
    id, title, describe, photo, url, status, sort, createTime
  </sql>
  <sql id="Blob_Column_List">
    content
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Byte" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_jft_small_class
    where id = #{id,jdbcType=TINYINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Byte">
    delete from tb_pluss_jft_small_class
    where id = #{id,jdbcType=TINYINT}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    insert into tb_pluss_jft_small_class (id, title, describe, 
      photo, url, status, sort, 
      createTime, content)
    values (#{id,jdbcType=TINYINT}, #{title,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, 
      #{photo,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{status,jdbcType=BIT}, #{sort,jdbcType=TINYINT}, 
      #{createtime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    insert into tb_pluss_jft_small_class
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="describe != null">
        describe,
      </if>
      <if test="photo != null">
        photo,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="sort != null">
        sort,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="content != null">
        content,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=TINYINT},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="describe != null">
        #{describe,jdbcType=VARCHAR},
      </if>
      <if test="photo != null">
        #{photo,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=BIT},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=TINYINT},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        #{content,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    update tb_pluss_jft_small_class
    <set>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="describe != null">
        describe = #{describe,jdbcType=VARCHAR},
      </if>
      <if test="photo != null">
        photo = #{photo,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=BIT},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=TINYINT},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=TINYINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    update tb_pluss_jft_small_class
    set title = #{title,jdbcType=VARCHAR},
      describe = #{describe,jdbcType=VARCHAR},
      photo = #{photo,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      status = #{status,jdbcType=BIT},
      sort = #{sort,jdbcType=TINYINT},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      content = #{content,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=TINYINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftSmallClass">
    update tb_pluss_jft_small_class
    set title = #{title,jdbcType=VARCHAR},
      describe = #{describe,jdbcType=VARCHAR},
      photo = #{photo,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      status = #{status,jdbcType=BIT},
      sort = #{sort,jdbcType=TINYINT},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=TINYINT}
  </update>
</mapper>