huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/DoEncrytDecrypt.java
@@ -1,16 +1,17 @@
package com.panzhihua.common.model.helper.encrypt;
import com.panzhihua.common.model.helper.AESUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.panzhihua.common.model.helper.AESUtil;
import lombok.extern.slf4j.Slf4j;
/***
 * 默认实现: AES 128 加密、解密
 * 可自定义实现{@link IEncryptDecrypt }接口
 * 默认实现: AES 128 加密、解密 可自定义实现{@link IEncryptDecrypt }接口
 *
 * @author cedoo
 * @since 2021-4-1 10:40:52
@@ -28,7 +29,8 @@
            if (field.getType() == String.class) {
                field.setAccessible(true);
                for (Annotation annotation : field.getAnnotations()) {
                    if (annotation.annotationType() == EncryptDecryptField.class || annotation.annotationType() == EncryptQuery.class) {
                    if (annotation.annotationType() == EncryptDecryptField.class
                        || annotation.annotationType() == EncryptQuery.class) {
                        log.debug("加密字段:" + field.getName());
                        Object fieldVal = field.get(parameterObject);
                        if(fieldVal!=null) {