From d71c8b3b2d5cba82898a9d1402af0d2da77293ce Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 6 Mar 2025 19:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BAsys=5Frole=20and=20sys=5Fuser?= =?UTF-8?q?=5Frole?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/menu/MenuRecipeMapper.xml | 61 ++++++++++--------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuRecipeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuRecipeMapper.xml index fc1bdef2..8e45f298 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuRecipeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuRecipeMapper.xml @@ -237,8 +237,13 @@ left join alloc_stall a on mr.stall_id = a.stall_id left join mkt_effective me on mr.eff_id = me.eff_id left join alloc_area aa on ac.area_id = aa.area_id + LEFT JOIN sys_role sr ON aa.area_id = sr.area_id + LEFT JOIN sys_user_role sur ON sr.role_id = sur.role_id where mr.del_flag = #{delFlag} + AND sr.del_flag = 0 + AND sr.role_key = #{authPO.roleCode} + AND sur.user_id = #{authPO.userId} and mr.recipe_id = #{content.recipeId} @@ -281,34 +286,34 @@ and mr.recipe_type = #{content.recipeType} - - and exists( - select - null - from mgr_role_canteen it1 - left join mgr_role it2 on it2.role_id = it1.role_id - left join mgr_user_role it3 on it1.role_id = it3.role_id - where - it2.del_flag = 2 - and it2.role_code = #{authPO.roleCode} - and it1.half_select = 1 - and it3.user_id = #{authPO.userId} - and mr.stall_id = it1.data_id - ) - - - and EXISTS ( - SELECT null - FROM mgr_role_area it1 - LEFT JOIN mgr_role it2 ON it2.role_id = it1.role_id - LEFT JOIN mgr_user_role it3 ON it1.role_id = it3.role_id - WHERE it2.del_flag = 2 - AND it2.role_code = #{authPO.roleCode} - AND it1.half_select = 1 - AND it3.user_id = #{authPO.userId} - AND aa.area_id = it1.data_id - ) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + order by mr.crtime desc