<?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.wms.mapper.MenuMapper">
    <select id="selMenuByRoleId" parameterType="Integer" resultType="com.wms.entity.table.Menu">
        select tsm.menu_id, tsm.label_name, tsm.icon_value, tsm.path, tsm.parent_id
        from tbl_sys_menu tsm left join tbl_sys_permission tsp on tsm.menu_id = tsp.menu_id
        where tsp.role_id = #{roleId}
        order by tsm.menu_id
    </select>
</mapper>