<?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.lantu.sys.mapper.MenuMapper">
    <select id="getMenuListByUserId" resultType="Menu">
        SELECT
            distinct a.*
        from x_menu a, x_role_menu b, x_user_role c
        where a.`menu_id` = b.`menu_id`
          and b.`role_id` = c.`role_id`
          and c.`id` = #{userId}
          and a.`parent_id` = #{pid}
    </select>


</mapper>
