From 1709a4d554eca49bf37348d1551c60d3fa12a7d9 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期六, 31 七月 2021 15:09:56 +0800
Subject: [PATCH] 防火防汛接口问题修复,实有人口接口改动
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java
index 93ee118..809d920 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java
@@ -8,6 +8,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.core.annotation.AnnotationUtils;
+import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import java.sql.Statement;
@@ -27,6 +28,7 @@
@ConditionalOnProperty(value = "domain.decrypt", havingValue = "true")
@Component
@Slf4j
+@Order(110)
public class ResultInterceptor implements Interceptor {
@Autowired
@@ -55,10 +57,12 @@
}
public boolean needToDecrypt(Object object){
- Class<?> objectClass = object.getClass();
- EncryptDecryptClass encryptDecryptClass = AnnotationUtils.findAnnotation(objectClass, EncryptDecryptClass.class);
- if (Objects.nonNull(encryptDecryptClass)){
- return true;
+ if(object!=null) {
+ Class<?> objectClass = object.getClass();
+ EncryptDecryptClass encryptDecryptClass = AnnotationUtils.findAnnotation(objectClass, EncryptDecryptClass.class);
+ if (Objects.nonNull(encryptDecryptClass)) {
+ return true;
+ }
}
return false;
}
--
Gitblit v1.7.1