From 528d0da19f5fc3f5c78af3c99a1f2cfa914a27dd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 01 二月 2024 17:00:08 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 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 4270e27..76ac274 100644
--- a/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml
+++ b/zy-asrs-wcs/src/main/resources/mapper/sys/RoleMenuMapper.xml
@@ -3,21 +3,19 @@
<mapper namespace="com.zy.asrs.wcs.sys.mapper.RoleMenuMapper">
<select id="listMenuByUserId" resultType="com.zy.asrs.wcs.sys.entity.Menu">
- SELECT a.*
- FROM sys_menu a
- <where>
- AND a.menu_id IN (
- SELECT menu_id FROM sys_role_menu WHERE role_id IN (
- SELECT ta.role_id FROM sys_user_role ta LEFT JOIN sys_role tb ON ta.role_id = tb.role_id
- WHERE ta.user_id = #{userId} AND tb.deleted = 0
+ select * from sys_menu
+ where 1=1
+ 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
)
- )
- <if test="menuType != null">
- AND a.menu_type = #{menuType}
- </if>
- AND a.deleted = 0
- </where>
- ORDER BY a.sort_number
+ )
+ order by sort
</select>
</mapper>
--
Gitblit v1.9.1