From c0d749b1e2ae840b5cadc66febb07aa0f9572ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 26 Jan 2022 18:30:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=20=E7=BC=93=E5=AD=98=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/framework/handler/PlusDataPermissionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/handler/PlusDataPermissionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/handler/PlusDataPermissionHandler.java index 5098917d..07795d94 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/handler/PlusDataPermissionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/handler/PlusDataPermissionHandler.java @@ -160,13 +160,13 @@ public class PlusDataPermissionHandler { DataPermission dataPermission; // 获取方法注解 for (Method method : methods) { - dataPermission = dataPermissionCacheMap.get(method.getName()); + dataPermission = dataPermissionCacheMap.get(mappedStatementId); if (ObjectUtil.isNotNull(dataPermission)) { return dataPermission.value(); } if (AnnotationUtil.hasAnnotation(method, DataPermission.class)) { dataPermission = AnnotationUtil.getAnnotation(method, DataPermission.class); - dataPermissionCacheMap.put(method.getName(), dataPermission); + dataPermissionCacheMap.put(mappedStatementId, dataPermission); return dataPermission.value(); } }