<?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.TbPlussHelpVideoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussHelpVideo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="videoUrl" jdbcType="VARCHAR" property="videourl" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, createDt, content, videoUrl, type, sort
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_help_video
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_help_video
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussHelpVideo">
    insert into tb_pluss_help_video (id, name, createDt, 
      content, videoUrl, type, 
      sort)
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{content,jdbcType=VARCHAR}, #{videourl,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
      #{sort,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussHelpVideo">
    insert into tb_pluss_help_video
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="videourl != null">
        videoUrl,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="sort != null">
        sort,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="videourl != null">
        #{videourl,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussHelpVideo">
    update tb_pluss_help_video
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="videourl != null">
        videoUrl = #{videourl,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussHelpVideo">
    update tb_pluss_help_video
    set name = #{name,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      content = #{content,jdbcType=VARCHAR},
      videoUrl = #{videourl,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      sort = #{sort,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>