From 3d6a6796bb90da3d87d35625b169c1f9680fae83 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 15 二月 2024 00:03:26 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml b/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml
index f8392f8..3d00005 100644
--- a/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml
+++ b/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml
@@ -2,4 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.wcs.sys.mapper.RoleMenuMapper">
+ <select id="listMenuByUserId" resultType="com.zy.asrs.wcs.sys.entity.Menu">
+ select * from sys_menu
+ where 1=1
+ <if test="type != null">
+ AND type = #{type}
+ </if>
+ and deleted = 0
+ and id in (
+ select menu_id from sys_role_menu
+ where role_id in (
+ select sur.role_id from sys_user_role sur
+ left join sys_role sr on sur.role_id = sr.id
+ where 1=1
+ and sur.user_id = #{userId}
+ and sr.deleted = 0
+ )
+ )
+ order by sort
+ </select>
+
</mapper>
--
Gitblit v1.9.1