From 6af3a9c58565a5616105d8c76b1cf91bae36d38a Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期三, 16 六月 2021 21:25:41 +0800
Subject: [PATCH] 修改bug
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java | 10 ++++++----
1 files changed, 6 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 8a75fa3..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
@@ -57,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