From f55fa60f4d73a46e143fb49cbc22a093582de3a9 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, 8 Mar 2023 17:53:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=8A=A0=E8=A7=A3?= =?UTF-8?q?=E5=AF=86=E6=8B=A6=E6=88=AA=E5=99=A8=20=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=A4=9A=E6=AC=A1=E5=A4=84=E7=90=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../encrypt/interceptor/MybatisDecryptInterceptor.java | 7 ++----- .../encrypt/interceptor/MybatisEncryptInterceptor.java | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisDecryptInterceptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisDecryptInterceptor.java index 817af567..2c209b48 100644 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisDecryptInterceptor.java +++ b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisDecryptInterceptor.java @@ -16,10 +16,7 @@ import org.apache.ibatis.plugin.*; import java.lang.reflect.Field; import java.sql.Statement; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; +import java.util.*; /** * 出参解密拦截器 @@ -60,7 +57,7 @@ public class MybatisDecryptInterceptor implements Interceptor { return; } if (sourceObject instanceof Map map) { - map.values().forEach(this::decryptHandler); + new HashSet<>(map.values()).forEach(this::decryptHandler); return; } if (sourceObject instanceof List list) { diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisEncryptInterceptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisEncryptInterceptor.java index 14a257d8..2a0b5601 100644 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisEncryptInterceptor.java +++ b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/interceptor/MybatisEncryptInterceptor.java @@ -19,10 +19,7 @@ import org.apache.ibatis.plugin.Signature; import java.lang.reflect.Field; import java.sql.PreparedStatement; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; +import java.util.*; /** * 入参加密拦截器 @@ -69,7 +66,7 @@ public class MybatisEncryptInterceptor implements Interceptor { return; } if (sourceObject instanceof Map map) { - map.values().forEach(this::encryptHandler); + new HashSet<>(map.values()).forEach(this::encryptHandler); return; } if (sourceObject instanceof List list) {