From d1351503a8f15685ff053efafc1d08540cb4239e 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: Tue, 1 Jun 2021 23:14:42 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=B9=A6=E5=86=99=E6=A0=BC=E5=BC=8F=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/framework/aspectj/DataScopeAspect.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index e8ef1018..383f4b64 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -159,6 +159,7 @@ public class DataScopeAspect { } } + @SuppressWarnings("unchecked") private static void putDataScope(JoinPoint joinPoint, String sql) { Object params = joinPoint.getArgs()[0]; if (Validator.isNotNull(params)) { @@ -167,8 +168,8 @@ public class DataScopeAspect { baseEntity.getParams().put(DATA_SCOPE, sql); } else { try { - Method getParams = params.getClass().getDeclaredMethod("getParams", null); - Map invoke = (Map) getParams.invoke(params, null); + Method getParams = params.getClass().getDeclaredMethod("getParams"); + Map invoke = (Map) getParams.invoke(params); invoke.put(DATA_SCOPE, sql); } catch (Exception e) { // 方法未找到 不处理