|
@@ -11,6 +11,7 @@ import com.diagbot.annotation.CryptField;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
+import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -70,6 +71,15 @@ public class CryptPojoUtils {
|
|
|
for (Object listValue : fieldValue) {
|
|
|
encryptField(listValue);
|
|
|
}
|
|
|
+ } else if (field.getType().equals(LinkedList.class)) {
|
|
|
+ field.setAccessible(true);
|
|
|
+ LinkedList fieldValue = (LinkedList) field.get(t);
|
|
|
+ if (ListUtil.isEmpty(fieldValue)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ for (Object listValue : fieldValue) {
|
|
|
+ encryptField(listValue);
|
|
|
+ }
|
|
|
} else {
|
|
|
field.setAccessible(true);
|
|
|
Object fieldValue = field.get(t);
|
|
@@ -136,6 +146,15 @@ public class CryptPojoUtils {
|
|
|
for (Object listValue : fieldValue) {
|
|
|
decryptField(listValue);
|
|
|
}
|
|
|
+ } else if (field.getType().equals(LinkedList.class)) {
|
|
|
+ field.setAccessible(true);
|
|
|
+ LinkedList fieldValue = (LinkedList) field.get(t);
|
|
|
+ if (ListUtil.isEmpty(fieldValue)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ for (Object listValue : fieldValue) {
|
|
|
+ decryptField(listValue);
|
|
|
+ }
|
|
|
} else {
|
|
|
field.setAccessible(true);
|
|
|
Object fieldValue = field.get(t);
|