From 1d31e70635182fe50860794e8aeefbcf3ebaac95 Mon Sep 17 00:00:00 2001 From: wangchl Date: Mon, 30 Jul 2018 14:36:36 +0800 Subject: [PATCH] mybatis/system/MenuMapper.xml --- src/main/resources/mybatis/system/MenuMapper.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mybatis/system/MenuMapper.xml b/src/main/resources/mybatis/system/MenuMapper.xml index db114124..c257124b 100644 --- a/src/main/resources/mybatis/system/MenuMapper.xml +++ b/src/main/resources/mybatis/system/MenuMapper.xml @@ -31,7 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id left join sys_user_role ur on rm.role_id = ur.role_id - where ur.user_id = #{userId} and m.menu_type in ('M', 'C') and m.visible = 0 + LEFT JOIN sys_role ro on ur.role_id = ro.role_id + where ur.user_id = #{userId} and m.menu_type in ('M', 'C') and m.visible = 0 AND ro.status = 0 order by m.order_num @@ -102,7 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where menu_id = #{menuId} + where 1=1 + and menu_id = #{menuId}