yumeng hace 1 año
padre
commit
4acc61f082

+ 11 - 1
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouOrderLIstGetJob.java

@@ -34,6 +34,7 @@ public class KuaishouOrderLIstGetJob {
     @Autowired
     private IKuaiShouActivityItemListService activityItemListService;
     static ExecutorService fxService = Executors.newFixedThreadPool(3);
+    static ExecutorService fxNowService = Executors.newFixedThreadPool(3);
 
 
 
@@ -192,7 +193,16 @@ public class KuaishouOrderLIstGetJob {
                     for (int p = 0; p < cookies.size(); p++) {
                         JSONObject cookieJson = cookies.get(p);
                         String cookie = cookieJson.getString("cookie");
-                        ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                        fxNowService.submit(new Runnable() {
+                            @Override
+                            public void run() {
+                                try {
+                                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                }
+                            }
+                        });
                     }
                 }
             }