Browse Source

解决元空间保存问题

yucheng 3 years ago
parent
commit
059539251d
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java

+ 14 - 1
src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java

@@ -24,7 +24,20 @@ public class AdmEntityTransferUtil {
      * @return
      */
     public static ArrayNode toDmpMultiEntity(List objList) {
-        return JsonNodeUtils.toArrayNode(objList, "infos", null);
+        ArrayNode arrayNode = JsonNodeUtils.toArrayNode(objList, "infos", null);
+        if(arrayNode == null) {
+            return arrayNode;
+        }
+        // outline特殊处理
+        for(int i = 0;i < arrayNode.size();i++) {
+            ObjectNode jsonNode = (ObjectNode) arrayNode.get(i);
+            JsonNode outLine = jsonNode.get("outline");
+            if(outLine != null && outLine.isObject()) {
+                jsonNode.remove("outline");
+                jsonNode.put("outline", outLine.toString());
+            }
+        }
+        return arrayNode;
     }
 
     /**