<?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="org.dromara.system.mapper.VsNavBottomMainMapper">

    <resultMap type="org.dromara.system.domain.vo.VsNavBottomMainVo" id="VsNavBottomMainResult">
        <result property="navId" column="nav_id"/>
        <result property="name" column="name"/>
        <result property="type" column="type"/>
        <result property="pic" column="pic"/>
        <result property="jumpType" column="jump_type"/>
        <result property="jumpPath" column="jump_path"/>
        <result property="appId" column="app_id"/>
        <result property="sortNum" column="sort_num"/>
        <result property="status" column="status"/>
        <result property="showFlag" column="show_flag"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
        <result property="tenantId" column="tenant_id"/>
        <result property="createDept" column="create_dept"/>
    </resultMap>

    <!-- 获取启用的底部主导航列表 -->
    <select id="getEnabledNavList" resultMap="VsNavBottomMainResult">
        SELECT * FROM common_vs_nav_bottom_main
        WHERE status = 0 AND del_flag = 0
        ORDER BY sort_num ASC
    </select>

    <!-- 根据类型获取导航列表 -->
    <select id="getNavListByType" resultMap="VsNavBottomMainResult">
        SELECT * FROM common_vs_nav_bottom_main
        WHERE type = #{type} AND del_flag = 0
        ORDER BY sort_num ASC
    </select>

</mapper>
