mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-13 05:59:01 +08:00
62 lines
2.5 KiB
XML
62 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
~
|
|
~ Copyright (c) 2018-2025, lengleng All rights reserved.
|
|
~
|
|
~ Redistribution and use in source and binary forms, with or without
|
|
~ modification, are permitted provided that the following conditions are met:
|
|
~
|
|
~ Redistributions of source code must retain the above copyright notice,
|
|
~ this list of conditions and the following disclaimer.
|
|
~ Redistributions in binary form must reproduce the above copyright
|
|
~ notice, this list of conditions and the following disclaimer in the
|
|
~ documentation and/or other materials provided with the distribution.
|
|
~ Neither the name of the pig4cloud.com developer nor the names of its
|
|
~ contributors may be used to endorse or promote products derived from
|
|
~ this software without specific prior written permission.
|
|
~ Author: lengleng (wangiegie@gmail.com)
|
|
~
|
|
-->
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.pig4cloud.pigx.app.mapper.AppMenuMapper">
|
|
|
|
<resultMap id="appMenuMap" type="com.pig4cloud.pigx.app.api.entity.AppMenu">
|
|
<id property="menuId" column="menu_id"/>
|
|
<result property="name" column="name"/>
|
|
<result property="permission" column="permission"/>
|
|
<result property="path" column="path"/>
|
|
<result property="parentId" column="parent_id"/>
|
|
<result property="visible" column="visible"/>
|
|
<result property="sortOrder" column="sort_order"/>
|
|
<result property="menuType" column="menu_type"/>
|
|
<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="delFlag" column="del_flag"/>
|
|
<result property="tenantId" column="tenant_id"/>
|
|
</resultMap>
|
|
<!--通过角色查询菜单-->
|
|
<select id="listMenusByRoleId" resultMap="appMenuMap">
|
|
SELECT app_menu.menu_id,
|
|
app_menu.name,
|
|
app_menu.permission,
|
|
app_menu.path,
|
|
app_menu.parent_id,
|
|
app_menu.sort_order,
|
|
app_menu.menu_type,
|
|
app_menu.visible,
|
|
app_menu.create_time,
|
|
app_menu.update_time,
|
|
app_menu.del_flag
|
|
FROM app_menu
|
|
LEFT JOIN app_role_menu ON app_menu.menu_id = app_role_menu.menu_id
|
|
WHERE app_menu.del_flag = '0'
|
|
AND app_role_menu.role_id = #{roleId}
|
|
ORDER BY app_menu.sort_order DESC
|
|
</select>
|
|
</mapper>
|