<?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.keyware.shandan.system.mapper.SysShortcutMenuMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.keyware.shandan.system.entity.SysShortcutMenu">
        <id column="SHORTCUT_MENU_ID" property="shortcutMenuId" />
        <result column="SHORTCUT_MENU_NAME" property="shortcutMenuName" />
        <result column="SHORTCUT_MENU_PATH" property="shortcutMenuPath" />
        <result column="USER_ID" property="userId" />
        <result column="SHORTCUT_MENU_PARENT_ID" property="shortcutMenuParentId" />
        <result column="SORT_WEIGHT" property="sortWeight" />
        <result column="CREATE_TIME" property="createTime" />
        <result column="MODIFY_TIME" property="modifyTime" />
        <result column="CREATE_USER" property="createUser" />
        <result column="MODIFY_USER" property="modifyUser" />
    </resultMap>
    <resultMap id="fullResultMap" type="com.keyware.shandan.system.entity.SysShortcutMenu" extends="BaseResultMap">
        <collection property="children" resultMap="BaseResultMap" />
    </resultMap>
    <select id="listByUserId" resultMap="fullResultMap">
        select * from SYS_SHORTCUT_MENU sm
        where sm.USER_ID = #{userId}
    </select>
</mapper>
