|
|
|
@ -76,7 +76,12 @@ public class MybatisDecryptInterceptor implements Interceptor {
|
|
|
|
|
Set<Field> fields = encryptorManager.getFieldCache(sourceObject.getClass());
|
|
|
|
|
try {
|
|
|
|
|
for (Field field : fields) {
|
|
|
|
|
field.set(sourceObject, this.decryptField(String.valueOf(field.get(sourceObject)), field));
|
|
|
|
|
// 防止对象不是null 属性内容是null
|
|
|
|
|
Object obj = field.get(sourceObject);
|
|
|
|
|
if (ObjectUtil.isNull(obj)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
field.set(sourceObject, this.decryptField(String.valueOf(field.get(obj)), field));
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("处理解密字段时出错", e);
|
|
|
|
|