<?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.SysMenuMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.keyware.shandan.system.entity.SysMenu">
        <id column="MENU_ID" property="menuId" />
        <result column="MENU_NAME" property="menuName" />
        <result column="MENU_PATH" property="menuPath" />
        <result column="MENU_PARENT_ID" property="menuParentId" />
        <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" />
        <result column="SYSTEM" property="system"/>
        <association property="parentMenu" column="MENU_PARENT_ID" select="selectById"/>
    </resultMap>
    <select id="listChildren" resultMap="BaseResultMap">
        select * from SYS_MENU m
        where m.IS_DELETE = '0' and m.MENU_PARENT_ID = #{parentId}
    </select>
</mapper>
