Bladeren bron

定时任务

Jxing 6 jaren geleden
bovenliggende
commit
f5df29b4ee
1 gewijzigde bestanden met toevoegingen van 9 en 2 verwijderingen
  1. 9 2
      src/main/java/com/sagacloud/route/Route.java

+ 9 - 2
src/main/java/com/sagacloud/route/Route.java

@@ -148,8 +148,15 @@ public class Route extends ExceptionHandlerBaseRoute {
                     Object temp = exchange.getIn().getBody();
                     exchange.setProperty("tempBody",temp);
                 })
-                .to(Const.venders+"/auxiliary/vender/query_detail").
-                process(new VenderMapProcessor());
+                .to(Const.venders+"/auxiliary/vender/query_detail")
+                .process(new VenderMapProcessor())
+                .split(body(), (oldmsg, newmsg) -> {
+                    if(oldmsg == null){
+                        return newmsg;
+                    }
+                    oldmsg.getIn().setBody(oldmsg.getIn().getBody(String.class) + newmsg.getIn().getBody(String.class));
+                    return oldmsg;
+                }).parallelProcessing().parallelAggregate().to("direct://test");
     }