mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	fix 修复 加解密拦截器 同一对象多次处理问题
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user