<?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.TbPlussAppMenuMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="icon" jdbcType="VARCHAR" property="icon" />
    <result column="menu_group" jdbcType="VARCHAR" property="menuGroup" />
    <result column="nav_code" jdbcType="VARCHAR" property="navCode" />
    <result column="nav_name" jdbcType="VARCHAR" property="navName" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="sort" jdbcType="TINYINT" property="sort" />
    <result column="visible" jdbcType="VARCHAR" property="visible" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="isApplets" jdbcType="VARCHAR" property="isapplets" />
    <result column="userName" jdbcType="VARCHAR" property="username" />
    <result column="path" jdbcType="VARCHAR" property="path" />
    <result column="isUniapp" jdbcType="VARCHAR" property="isuniapp" />
    <result column="isAndroidEnabled" jdbcType="VARCHAR" property="isandroidenabled" />
    <result column="isIphoneEnabled" jdbcType="VARCHAR" property="isiphoneenabled" />
    <result column="androidMinVersionName" jdbcType="VARCHAR" property="androidminversionname" />
    <result column="iosMinVersionName" jdbcType="VARCHAR" property="iosminversionname" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, code, icon, menu_group, nav_code, nav_name, url, sort, visible, create_time, 
    update_time, isApplets, userName, path, isUniapp, isAndroidEnabled, isIphoneEnabled, 
    androidMinVersionName, iosMinVersionName
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_app_menu
    where id = #{id,jdbcType=INTEGER}
  </select>
    <select id="selectAppMenuList" resultType="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
      SELECT
      <include refid="Base_Column_List" />

      FROM tb_pluss_app_menu
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_app_menu
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
    insert into tb_pluss_app_menu (id, name, code, 
      icon, menu_group, nav_code, 
      nav_name, url, sort, 
      visible, create_time, update_time, 
      isApplets, userName, path, 
      isUniapp, isAndroidEnabled, isIphoneEnabled, 
      androidMinVersionName, iosMinVersionName
      )
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
      #{icon,jdbcType=VARCHAR}, #{menuGroup,jdbcType=VARCHAR}, #{navCode,jdbcType=VARCHAR}, 
      #{navName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{sort,jdbcType=TINYINT}, 
      #{visible,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{isapplets,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, 
      #{isuniapp,jdbcType=VARCHAR}, #{isandroidenabled,jdbcType=VARCHAR}, #{isiphoneenabled,jdbcType=VARCHAR}, 
      #{androidminversionname,jdbcType=VARCHAR}, #{iosminversionname,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
    insert into tb_pluss_app_menu
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="code != null">
        code,
      </if>
      <if test="icon != null">
        icon,
      </if>
      <if test="menuGroup != null">
        menu_group,
      </if>
      <if test="navCode != null">
        nav_code,
      </if>
      <if test="navName != null">
        nav_name,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="sort != null">
        sort,
      </if>
      <if test="visible != null">
        visible,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="isapplets != null">
        isApplets,
      </if>
      <if test="username != null">
        userName,
      </if>
      <if test="path != null">
        path,
      </if>
      <if test="isuniapp != null">
        isUniapp,
      </if>
      <if test="isandroidenabled != null">
        isAndroidEnabled,
      </if>
      <if test="isiphoneenabled != null">
        isIphoneEnabled,
      </if>
      <if test="androidminversionname != null">
        androidMinVersionName,
      </if>
      <if test="iosminversionname != null">
        iosMinVersionName,
      </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="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        #{icon,jdbcType=VARCHAR},
      </if>
      <if test="menuGroup != null">
        #{menuGroup,jdbcType=VARCHAR},
      </if>
      <if test="navCode != null">
        #{navCode,jdbcType=VARCHAR},
      </if>
      <if test="navName != null">
        #{navName,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=TINYINT},
      </if>
      <if test="visible != null">
        #{visible,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isapplets != null">
        #{isapplets,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        #{username,jdbcType=VARCHAR},
      </if>
      <if test="path != null">
        #{path,jdbcType=VARCHAR},
      </if>
      <if test="isuniapp != null">
        #{isuniapp,jdbcType=VARCHAR},
      </if>
      <if test="isandroidenabled != null">
        #{isandroidenabled,jdbcType=VARCHAR},
      </if>
      <if test="isiphoneenabled != null">
        #{isiphoneenabled,jdbcType=VARCHAR},
      </if>
      <if test="androidminversionname != null">
        #{androidminversionname,jdbcType=VARCHAR},
      </if>
      <if test="iosminversionname != null">
        #{iosminversionname,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
    update tb_pluss_app_menu
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        icon = #{icon,jdbcType=VARCHAR},
      </if>
      <if test="menuGroup != null">
        menu_group = #{menuGroup,jdbcType=VARCHAR},
      </if>
      <if test="navCode != null">
        nav_code = #{navCode,jdbcType=VARCHAR},
      </if>
      <if test="navName != null">
        nav_name = #{navName,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=TINYINT},
      </if>
      <if test="visible != null">
        visible = #{visible,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isapplets != null">
        isApplets = #{isapplets,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        userName = #{username,jdbcType=VARCHAR},
      </if>
      <if test="path != null">
        path = #{path,jdbcType=VARCHAR},
      </if>
      <if test="isuniapp != null">
        isUniapp = #{isuniapp,jdbcType=VARCHAR},
      </if>
      <if test="isandroidenabled != null">
        isAndroidEnabled = #{isandroidenabled,jdbcType=VARCHAR},
      </if>
      <if test="isiphoneenabled != null">
        isIphoneEnabled = #{isiphoneenabled,jdbcType=VARCHAR},
      </if>
      <if test="androidminversionname != null">
        androidMinVersionName = #{androidminversionname,jdbcType=VARCHAR},
      </if>
      <if test="iosminversionname != null">
        iosMinVersionName = #{iosminversionname,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppMenu">
    update tb_pluss_app_menu
    set name = #{name,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      icon = #{icon,jdbcType=VARCHAR},
      menu_group = #{menuGroup,jdbcType=VARCHAR},
      nav_code = #{navCode,jdbcType=VARCHAR},
      nav_name = #{navName,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      sort = #{sort,jdbcType=TINYINT},
      visible = #{visible,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      isApplets = #{isapplets,jdbcType=VARCHAR},
      userName = #{username,jdbcType=VARCHAR},
      path = #{path,jdbcType=VARCHAR},
      isUniapp = #{isuniapp,jdbcType=VARCHAR},
      isAndroidEnabled = #{isandroidenabled,jdbcType=VARCHAR},
      isIphoneEnabled = #{isiphoneenabled,jdbcType=VARCHAR},
      androidMinVersionName = #{androidminversionname,jdbcType=VARCHAR},
      iosMinVersionName = #{iosminversionname,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>