<?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.TbPlussMenuInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMenuInfo">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="menuType" jdbcType="INTEGER" property="menutype" />
    <result column="parentId" jdbcType="BIGINT" property="parentid" />
    <result column="menuOrder" jdbcType="INTEGER" property="menuorder" />
    <result column="visible" jdbcType="BIT" property="visible" />
    <result column="creator" jdbcType="VARCHAR" property="creator" />
    <result column="version" jdbcType="VARCHAR" property="version" />
    <result column="description" jdbcType="VARCHAR" property="description" />
    <result column="seq" jdbcType="INTEGER" property="seq" />
    <result column="pid" jdbcType="BIGINT" property="pid" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussMenuInfoWithBLOBs">
    <result column="link" jdbcType="LONGVARCHAR" property="link" />
    <result column="iconUrl" jdbcType="LONGVARCHAR" property="iconurl" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, menuType, parentId, menuOrder, visible, creator, version, description, 
    seq, pid, sort
  </sql>
  <sql id="Blob_Column_List">
    link, iconUrl
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_menu_info
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_pluss_menu_info
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMenuInfoWithBLOBs">
    insert into tb_pluss_menu_info (id, name, menuType, 
      parentId, menuOrder, visible, 
      creator, version, description, 
      seq, pid, sort, link, 
      iconUrl)
    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{menutype,jdbcType=INTEGER}, 
      #{parentid,jdbcType=BIGINT}, #{menuorder,jdbcType=INTEGER}, #{visible,jdbcType=BIT}, 
      #{creator,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
      #{seq,jdbcType=INTEGER}, #{pid,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER}, #{link,jdbcType=LONGVARCHAR}, 
      #{iconurl,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMenuInfoWithBLOBs">
    insert into tb_pluss_menu_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="menutype != null">
        menuType,
      </if>
      <if test="parentid != null">
        parentId,
      </if>
      <if test="menuorder != null">
        menuOrder,
      </if>
      <if test="visible != null">
        visible,
      </if>
      <if test="creator != null">
        creator,
      </if>
      <if test="version != null">
        version,
      </if>
      <if test="description != null">
        description,
      </if>
      <if test="seq != null">
        seq,
      </if>
      <if test="pid != null">
        pid,
      </if>
      <if test="sort != null">
        sort,
      </if>
      <if test="link != null">
        link,
      </if>
      <if test="iconurl != null">
        iconUrl,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="menutype != null">
        #{menutype,jdbcType=INTEGER},
      </if>
      <if test="parentid != null">
        #{parentid,jdbcType=BIGINT},
      </if>
      <if test="menuorder != null">
        #{menuorder,jdbcType=INTEGER},
      </if>
      <if test="visible != null">
        #{visible,jdbcType=BIT},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        #{version,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        #{seq,jdbcType=INTEGER},
      </if>
      <if test="pid != null">
        #{pid,jdbcType=BIGINT},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=INTEGER},
      </if>
      <if test="link != null">
        #{link,jdbcType=LONGVARCHAR},
      </if>
      <if test="iconurl != null">
        #{iconurl,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMenuInfoWithBLOBs">
    update tb_pluss_menu_info
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="menutype != null">
        menuType = #{menutype,jdbcType=INTEGER},
      </if>
      <if test="parentid != null">
        parentId = #{parentid,jdbcType=BIGINT},
      </if>
      <if test="menuorder != null">
        menuOrder = #{menuorder,jdbcType=INTEGER},
      </if>
      <if test="visible != null">
        visible = #{visible,jdbcType=BIT},
      </if>
      <if test="creator != null">
        creator = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        version = #{version,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        description = #{description,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        seq = #{seq,jdbcType=INTEGER},
      </if>
      <if test="pid != null">
        pid = #{pid,jdbcType=BIGINT},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=INTEGER},
      </if>
      <if test="link != null">
        link = #{link,jdbcType=LONGVARCHAR},
      </if>
      <if test="iconurl != null">
        iconUrl = #{iconurl,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMenuInfoWithBLOBs">
    update tb_pluss_menu_info
    set name = #{name,jdbcType=VARCHAR},
      menuType = #{menutype,jdbcType=INTEGER},
      parentId = #{parentid,jdbcType=BIGINT},
      menuOrder = #{menuorder,jdbcType=INTEGER},
      visible = #{visible,jdbcType=BIT},
      creator = #{creator,jdbcType=VARCHAR},
      version = #{version,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR},
      seq = #{seq,jdbcType=INTEGER},
      pid = #{pid,jdbcType=BIGINT},
      sort = #{sort,jdbcType=INTEGER},
      link = #{link,jdbcType=LONGVARCHAR},
      iconUrl = #{iconurl,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMenuInfo">
    update tb_pluss_menu_info
    set name = #{name,jdbcType=VARCHAR},
      menuType = #{menutype,jdbcType=INTEGER},
      parentId = #{parentid,jdbcType=BIGINT},
      menuOrder = #{menuorder,jdbcType=INTEGER},
      visible = #{visible,jdbcType=BIT},
      creator = #{creator,jdbcType=VARCHAR},
      version = #{version,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR},
      seq = #{seq,jdbcType=INTEGER},
      pid = #{pid,jdbcType=BIGINT},
      sort = #{sort,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>