Ver código fonte

Merge remote-tracking branch 'origin/develop' into develop

lijie 3 anos atrás
pai
commit
2258945f72

+ 5 - 0
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/digital/controller/ObjectDigitalController.java

@@ -448,6 +448,11 @@ public class ObjectDigitalController{
         }
         for (JsonNode jsonNode : array) {
             JsonNode name = jsonNode.get("name");
+            // 容错机制,如果name为空,将localName赋过去
+            if(name == null) {
+                JsonNode localName = jsonNode.get("localName");
+                name = ((ObjectNode) jsonNode).set("name", localName);
+            }
             if(name == null){
                 throw new BusinessException(ResponseCode.A0400.getCode(),"对象名称不能为空");
             }