SbloodyS commented on code in PR #10184:
URL: https://github.com/apache/dolphinscheduler/pull/10184#discussion_r880204142


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpParameters.java:
##########
@@ -130,4 +136,44 @@ public int getSocketTimeout() {
     public void setSocketTimeout(int socketTimeout) {
         this.socketTimeout = socketTimeout;
     }
+    @Override
+    public void dealOutParam(String result) {
+        if (CollectionUtils.isEmpty(localParams)) {
+            return;
+        }
+        List<Property> outProperty = getOutProperty(localParams);
+        if (CollectionUtils.isEmpty(outProperty)) {
+            return;
+        }
+        if (StringUtils.isEmpty(result)) {
+            varPool.addAll(outProperty);
+            return;
+        }
+        Map<String, String> httpMapByString = getHttpMapByString(result);
+        //判断是否为空
+        if (httpMapByString == null || httpMapByString.size() == 0) {
+            return;
+        }
+
+        for (Property info : outProperty) {
+            info.setValue(httpMapByString.get(info.getProp()));
+            varPool.add(info);
+        }
+    }
+
+    protected String setBodyReturn(String updateResult, List<Property> 
properties) {
+        String result = null;
+        List<Map<String, String>> updateRL = new ArrayList<>();
+        Map<String, String> updateRM = new HashMap<>();
+        for (Property info : properties) {
+            if (Direct.OUT == info.getDirect()) {
+                updateRM.put(info.getProp(), updateResult);
+                updateRL.add(updateRM);
+                result = JSONUtils.toJsonString(updateRL);
+                // break;

Review Comment:
   What i mean is remove ```// break;```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to