Explorar o código

更新全部项目接口

FanXiaoyu %!s(int64=6) %!d(string=hai) anos
pai
achega
a46e68b0b7
Modificáronse 1 ficheiros con 5 adicións e 15 borrados
  1. 5 15
      src/main/java/com/sagacloud/route/Route.java

+ 5 - 15
src/main/java/com/sagacloud/route/Route.java

@@ -116,20 +116,6 @@ public class Route extends ExceptionHandlerBaseRoute {
                 .process(new FilterPropertyProcessor());
 
 
-        rest("/test/").get().produces(MediaType.APPLICATION_JSON).route()
-                .process(msg -> {
-                    List<String> lst = new ArrayList<>();
-                    for (int i = 0; i < 1000; i++) {
-                        lst.add("hh" + i);
-                    }
-                    msg.getOut().setBody(lst);
-                }).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");
 
         rest("/project/sync").post()
                 .consumes(MediaType.APPLICATION_JSON)
@@ -147,7 +133,11 @@ public class Route extends ExceptionHandlerBaseRoute {
                 })
                 .to("direct:buildVenderMap");
 
-
+        rest("/project/sync_all").post()
+                .consumes(MediaType.APPLICATION_JSON)
+                .produces(MediaType.APPLICATION_JSON)
+                .route()
+                .to("direct:syncAllProject");
 
         //同步全部项目的资产信息
         from("direct:syncAllProject")