Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

zhaoxian 7 месяцев назад
Родитель
Сommit
c06707683f
32 измененных файлов с 1277 добавлено и 162 удалено
  1. 5 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 7 14
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouOrderLIstGetJob.java
  3. 3 64
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/MgsOrderLIstGetJob.java
  4. 3 6
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/RocketOrderLIstGetJob.java
  5. 4 11
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/YuXiuOrderLIstGetJob.java
  6. 3 8
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/YufuOrderLIstGetJob.java
  7. 152 0
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/ZhiShuiOrderLIstGetJob.java
  8. 6 1
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/settlementJob.java
  9. 10 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaishouSupplyChainMapper.java
  10. 2 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/MgsSupplyChainMapper.java
  11. 2 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/RocketSupplyChainMapper.java
  12. 2 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/YuXiuSupplyChainMapper.java
  13. 2 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/YufuSupplyChainMapper.java
  14. 23 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/ZhiShuiSupplyChainMapper.java
  15. 103 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouSupplyChainMapper.xml
  16. 63 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/MgsSupplyChainMapper.xml
  17. 63 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/RocketSupplyChainMapper.xml
  18. 63 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/YuXiuSupplyChainMapper.xml
  19. 65 5
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/YufuSupplyChainMapper.xml
  20. 399 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/ZhiShuiSupplyChainMapper.xml
  21. 9 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouSupplyChainService.java
  22. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IMgsSupplyChainService.java
  23. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IYuXiuSupplyChainService.java
  24. 11 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IZhiShuiSupplyChainService.java
  25. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/RocketSupplyChainService.java
  26. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/YufuSupplyChainService.java
  27. 34 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouSupplyChainServiceImpl.java
  28. 11 16
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/MgsSupplyChainServiceImpl.java
  29. 10 6
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/RocketSupplyChainServiceImpl.java
  30. 11 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/YuXiuSupplyChainServiceImpl.java
  31. 9 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/YufuSupplyChainServiceImpl.java
  32. 198 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/ZhiShuiSupplyChainServiceImpl.java

+ 5 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -168,7 +168,7 @@ public class TestController {
     private IMgsSupplyChainService mgsSupplyChainService;
 
     @Autowired
-    private IYuXiuSupplyChainService yuXiuSupplyChainService;
+    private IZhiShuiSupplyChainService zhiShuiSupplyChainService;
 
     @Autowired
     private IKuaishouSupplyChainService ikuaishouSupplyChainService;
@@ -181,18 +181,15 @@ public class TestController {
     @GetMapping(value = "/getData")
     public void getDate() throws Exception {
         log.info("-------------------------获取快分销订单当前月数据开始数据开始--------------------------");
-        List<JSONObject> cookies = yuXiuSupplyChainService.getCookie();
+        List<JSONObject> cookies = zhiShuiSupplyChainService.getCookie();
         if (Check.isNull(cookies)) {
             log.error("cookie数据为空");
             return;
         }
-        String nowDate = "2024-09-23";
-        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -10);
-
-        List<String> days = DateUtils.getDays("2024-08-19", nowDate);
+        String nowDate = "2024-10-29";
+        List<String> days = DateUtils.getDays("2024-10-28", nowDate);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getYufuItemList();
         for (int z = 0; z < days.size(); z++) {
             String date = days.get(z);
             for (int i = 0; i < hourList.size(); i++) {
@@ -213,7 +210,7 @@ public class TestController {
                             @Override
                             public void run() {
                                 try {
-                                    yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                                    zhiShuiSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                                 } catch (Exception e) {
                                     e.printStackTrace();
                                 }

+ 7 - 14
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouOrderLIstGetJob.java

@@ -37,7 +37,6 @@ public class KuaishouOrderLIstGetJob {
     static ExecutorService fxNowService = Executors.newFixedThreadPool(3);
 
 
-
     /**
      * 快分销-招商活动商品数据同步
      **/
@@ -115,7 +114,6 @@ public class KuaishouOrderLIstGetJob {
         }
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         for (int z = 0; z < days.size(); z++) {
             String date = days.get(z);
             for (int i = 0; i < hourList.size(); i++) {
@@ -132,7 +130,7 @@ 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);
+                        ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
 
 
                     }
@@ -160,7 +158,6 @@ public class KuaishouOrderLIstGetJob {
         List<String> days = DateUtils.getDays(monthFirstDay, endDate);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         for (int z = 0; z < days.size(); z++) {
             String date = days.get(z);
             for (int i = 0; i < hourList.size(); i++) {
@@ -181,7 +178,7 @@ public class KuaishouOrderLIstGetJob {
                             @Override
                             public void run() {
                                 try {
-                                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                                 } catch (Exception e) {
                                     e.printStackTrace();
                                 }
@@ -211,7 +208,6 @@ public class KuaishouOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -228,7 +224,7 @@ 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);
+                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -250,7 +246,6 @@ public class KuaishouOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -267,7 +262,7 @@ 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);
+                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
 
             }
@@ -296,7 +291,6 @@ public class KuaishouOrderLIstGetJob {
 
 
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         for (int i = 0; i < hours.size(); i++) {
             Integer hour = hours.getInteger(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -313,7 +307,7 @@ 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);
+                    ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -337,11 +331,10 @@ public class KuaishouOrderLIstGetJob {
         String date = DateUtils.getNowDate("yyyy-MM-dd");
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getItemMap();
         Integer nowHour = DateUtils.getNowHour();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
-            Integer integer = Integer.valueOf(hour.replace(":","").replace(" ",""));
+            Integer integer = Integer.valueOf(hour.replace(":", "").replace(" ", ""));
             if (integer <= nowHour) {
                 for (int j = 0; j < minSecList.size(); j++) {
                     JSONObject minSecJson = minSecList.getJSONObject(j);
@@ -357,7 +350,7 @@ 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);
+                        ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                     }
                 }
             }

+ 3 - 64
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/MgsOrderLIstGetJob.java

@@ -32,62 +32,6 @@ public class MgsOrderLIstGetJob {
 
 
     /**
-     * 快分销-11、12月所有数据
-     **/
-    @XxlJob("mgsAllOrderGet")
-    public void allOrderGet() throws Exception {
-        //   List<String> dateList = new ArrayList<>();
-        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-        String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -93);
-        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
-        List<String> days = DateUtils.getDays(startDate, endDate);
-
-        List<JSONObject> cookies = mgsSupplyChainService.getCookie();
-        if (Check.isNull(cookies)) {
-            log.error("cookie数据为空");
-            return;
-        }
-        JSONArray hourList = KuaishouHourEnum.getHourList();
-        JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getMgsItemList();
-        for (int z = 0; z < days.size(); z++) {
-            String date = days.get(z);
-            for (int i = 0; i < hourList.size(); i++) {
-                String hour = hourList.getString(i);
-                for (int j = 0; j < minSecList.size(); j++) {
-                    JSONObject minSecJson = minSecList.getJSONObject(j);
-                    String startTime = minSecJson.getString("startTime");
-                    String endTime = minSecJson.getString("endTime");
-                    String start = date + hour + startTime;
-                    String end = date + hour + endTime;
-                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-                    Long orderCreateTimeStart = sdf.parse(start).getTime();
-                    Long orderCreateTimeEnd = sdf.parse(end).getTime();
-                    for (int p = 0; p < cookies.size(); p++) {
-                        JSONObject cookieJson = cookies.get(p);
-                        String cookie = cookieJson.getString("cookie");
-                        mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
-                        fxService.submit(new Runnable() {
-                            @Override
-                            public void run() {
-                                try {
-                                    mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        });
-
-
-                    }
-                }
-            }
-
-        }
-    }
-
-
-    /**
      * 昨日快分销数据获取
      **/
     @XxlJob("mgsYesterdayOrderGet")
@@ -101,7 +45,6 @@ public class MgsOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getMgsItemList();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -118,7 +61,7 @@ public class MgsOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -142,10 +85,7 @@ public class MgsOrderLIstGetJob {
         if (nowHour >= 1) {
             hours.add(nowHour - 1);
         }
-
-
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getMgsItemList();
         for (int i = 0; i < hours.size(); i++) {
             Integer hour = hours.getInteger(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -162,7 +102,7 @@ public class MgsOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -184,7 +124,6 @@ public class MgsOrderLIstGetJob {
         String date = DateUtils.getNowDate("yyyy-MM-dd");
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getMgsItemList();
         Integer nowHour = DateUtils.getNowHour();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
@@ -204,7 +143,7 @@ public class MgsOrderLIstGetJob {
                     for (int p = 0; p < cookies.size(); p++) {
                         JSONObject cookieJson = cookies.get(p);
                         String cookie = cookieJson.getString("cookie");
-                        mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                        mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                     }
                 }
             }

+ 3 - 6
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/RocketOrderLIstGetJob.java

@@ -45,7 +45,6 @@ public class RocketOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getRocketItemList();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -62,7 +61,7 @@ public class RocketOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -89,7 +88,6 @@ public class RocketOrderLIstGetJob {
 
 
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getRocketItemList();
         for (int i = 0; i < hours.size(); i++) {
             Integer hour = hours.getInteger(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -106,7 +104,7 @@ public class RocketOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -128,7 +126,6 @@ public class RocketOrderLIstGetJob {
         String date = DateUtils.getNowDate("yyyy-MM-dd");
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = activityItemListService.getRocketItemList();
         Integer nowHour = DateUtils.getNowHour();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
@@ -148,7 +145,7 @@ public class RocketOrderLIstGetJob {
                     for (int p = 0; p < cookies.size(); p++) {
                         JSONObject cookieJson = cookies.get(p);
                         String cookie = cookieJson.getString("cookie");
-                        rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                        rocketSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                     }
                 }
             }

+ 4 - 11
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/YuXiuOrderLIstGetJob.java

@@ -28,11 +28,6 @@ public class YuXiuOrderLIstGetJob {
     @Autowired
     private IYuXiuSupplyChainService yuXiuSupplyChainService;
 
-    @Autowired
-    private IKuaiShouActivityItemListService yufuActivityItemListService;
-
-    static ExecutorService fxService = Executors.newFixedThreadPool(3);
-
     /**
      * 昨日快分销数据获取
      **/
@@ -47,7 +42,7 @@ public class YuXiuOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYuXiuItemList();
+       // Map<Long, Long> itemMap = yufuActivityItemListService.getYuXiuItemList();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -64,7 +59,7 @@ public class YuXiuOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -91,7 +86,6 @@ public class YuXiuOrderLIstGetJob {
 
 
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYuXiuItemList();
         for (int i = 0; i < hours.size(); i++) {
             Integer hour = hours.getInteger(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -108,7 +102,7 @@ public class YuXiuOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -130,7 +124,6 @@ public class YuXiuOrderLIstGetJob {
         String date = DateUtils.getNowDate("yyyy-MM-dd");
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYuXiuItemList();
         Integer nowHour = DateUtils.getNowHour();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
@@ -150,7 +143,7 @@ public class YuXiuOrderLIstGetJob {
                     for (int p = 0; p < cookies.size(); p++) {
                         JSONObject cookieJson = cookies.get(p);
                         String cookie = cookieJson.getString("cookie");
-                        yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                        yuXiuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                     }
                 }
             }

+ 3 - 8
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/YufuOrderLIstGetJob.java

@@ -45,7 +45,6 @@ public class YufuOrderLIstGetJob {
         String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYufuItemList();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -62,7 +61,7 @@ public class YufuOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -86,10 +85,7 @@ public class YufuOrderLIstGetJob {
         if (nowHour >= 1) {
             hours.add(nowHour - 1);
         }
-
-
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYufuItemList();
         for (int i = 0; i < hours.size(); i++) {
             Integer hour = hours.getInteger(i);
             for (int j = 0; j < minSecList.size(); j++) {
@@ -106,7 +102,7 @@ public class YufuOrderLIstGetJob {
                 for (int p = 0; p < cookies.size(); p++) {
                     JSONObject cookieJson = cookies.get(p);
                     String cookie = cookieJson.getString("cookie");
-                    yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                    yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                 }
             }
         }
@@ -128,7 +124,6 @@ public class YufuOrderLIstGetJob {
         String date = DateUtils.getNowDate("yyyy-MM-dd");
         JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        Map<Long, Long> itemMap = yufuActivityItemListService.getYufuItemList();
         Integer nowHour = DateUtils.getNowHour();
         for (int i = 0; i < hourList.size(); i++) {
             String hour = hourList.getString(i);
@@ -148,7 +143,7 @@ public class YufuOrderLIstGetJob {
                     for (int p = 0; p < cookies.size(); p++) {
                         JSONObject cookieJson = cookies.get(p);
                         String cookie = cookieJson.getString("cookie");
-                        yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+                        yufuSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
                     }
                 }
             }

+ 152 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/ZhiShuiOrderLIstGetJob.java

@@ -0,0 +1,152 @@
+package cn.com.ctop.job.kuaishou.handler;
+
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.kuaishou.modules.batch.Enums.KuaishouHourEnum;
+import cn.com.ctop.kuaishou.modules.batch.Enums.KuaishouMinSecEnum;
+import cn.com.ctop.kuaishou.modules.batch.service.IZhiShuiSupplyChainService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+@Slf4j
+@Component
+public class ZhiShuiOrderLIstGetJob {
+
+    @Autowired
+    private IZhiShuiSupplyChainService zhiShuiSupplyChainService;
+
+
+    static ExecutorService fxService = Executors.newFixedThreadPool(3);
+
+    /**
+     * 昨日快分销数据获取
+     **/
+    @XxlJob("zhishuiYesterdayOrderGet")
+    public void zhishuiYesterdayOrderGet() throws Exception {
+        List<JSONObject> cookies = zhiShuiSupplyChainService.getCookie();
+        if (Check.isNull(cookies)) {
+            log.error("cookie数据为空");
+            return;
+        }
+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
+        String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        JSONArray hourList = KuaishouHourEnum.getHourList();
+        JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
+        for (int i = 0; i < hourList.size(); i++) {
+            String hour = hourList.getString(i);
+            for (int j = 0; j < minSecList.size(); j++) {
+                JSONObject minSecJson = minSecList.getJSONObject(j);
+                String startTime = minSecJson.getString("startTime");
+                String endTime = minSecJson.getString("endTime");
+                String start = date + hour + startTime;
+                String end = date + hour + endTime;
+                System.err.println("开始时间:" + start);
+                System.err.println("结束时间:" + end);
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Long orderCreateTimeStart = sdf.parse(start).getTime();
+                Long orderCreateTimeEnd = sdf.parse(end).getTime();
+                for (int p = 0; p < cookies.size(); p++) {
+                    JSONObject cookieJson = cookies.get(p);
+                    String cookie = cookieJson.getString("cookie");
+                    zhiShuiSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+                }
+            }
+        }
+    }
+
+
+    /**
+     * 当前小时数据获取
+     **/
+    @XxlJob("zhishuiNowHourOrderGet")
+    public void zhishuiNowHourOrderGet() throws Exception {
+        List<JSONObject> cookies = zhiShuiSupplyChainService.getCookie();
+        if (Check.isNull(cookies)) {
+            log.error("cookie数据为空");
+            return;
+        }
+        String date = DateUtils.getNowDate("yyyy-MM-dd");
+        Integer nowHour = DateUtils.getNowHour();
+        JSONArray hours = new JSONArray();
+        hours.add(nowHour);
+        if (nowHour >= 1) {
+            hours.add(nowHour - 1);
+        }
+
+
+        JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
+        for (int i = 0; i < hours.size(); i++) {
+            Integer hour = hours.getInteger(i);
+            for (int j = 0; j < minSecList.size(); j++) {
+                JSONObject minSecJson = minSecList.getJSONObject(j);
+                String startTime = minSecJson.getString("startTime");
+                String endTime = minSecJson.getString("endTime");
+                String start = date + " " + hour + ":" + startTime;
+                String end = date + " " + hour + ":" + endTime;
+                System.err.println("开始时间:" + start);
+                System.err.println("结束时间:" + end);
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Long orderCreateTimeStart = sdf.parse(start).getTime();
+                Long orderCreateTimeEnd = sdf.parse(end).getTime();
+                for (int p = 0; p < cookies.size(); p++) {
+                    JSONObject cookieJson = cookies.get(p);
+                    String cookie = cookieJson.getString("cookie");
+                    zhiShuiSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+                }
+            }
+        }
+    }
+
+    /**
+     * 当天所有数据获取
+     **/
+    /**
+     * 当天数据获取
+     **/
+    @XxlJob("zhishuiFrontHourOrderGet")
+    public void zhishuiFrontHourOrderGet() throws Exception {
+        List<JSONObject> cookies = zhiShuiSupplyChainService.getCookie();
+        if (Check.isNull(cookies)) {
+            log.error("cookie数据为空");
+            return;
+        }
+        String date = DateUtils.getNowDate("yyyy-MM-dd");
+        JSONArray hourList = KuaishouHourEnum.getHourList();
+        JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
+        Integer nowHour = DateUtils.getNowHour();
+        for (int i = 0; i < hourList.size(); i++) {
+            String hour = hourList.getString(i);
+            Integer integer = Integer.valueOf(hour.replace(":", "").replace(" ", ""));
+            if (integer <= nowHour) {
+                for (int j = 0; j < minSecList.size(); j++) {
+                    JSONObject minSecJson = minSecList.getJSONObject(j);
+                    String startTime = minSecJson.getString("startTime");
+                    String endTime = minSecJson.getString("endTime");
+                    String start = date + hour + startTime;
+                    String end = date + hour + endTime;
+                    System.err.println("开始时间:" + start);
+                    System.err.println("结束时间:" + end);
+                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    Long orderCreateTimeStart = sdf.parse(start).getTime();
+                    Long orderCreateTimeEnd = sdf.parse(end).getTime();
+                    for (int p = 0; p < cookies.size(); p++) {
+                        JSONObject cookieJson = cookies.get(p);
+                        String cookie = cookieJson.getString("cookie");
+                        zhiShuiSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+                    }
+                }
+            }
+        }
+    }
+
+
+}

+ 6 - 1
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/settlementJob.java

@@ -191,7 +191,8 @@ public class settlementJob {
         ikuaishouSupplyChainService.cleanYuXiuKuaiShouPromoterBindChannel(date);
 
 
-
+        ikuaishouSupplyChainService.deleteZhiShuiPromoterBindChannelByDate(date);
+        ikuaishouSupplyChainService.cleanZhiShuiKuaiShouPromoterBindChannel(date);
 
 
         // 招商
@@ -216,6 +217,10 @@ public class settlementJob {
         ikuaishouSupplyChainService.cleanYuXiuItemBindCourtship(date);
 
 
+        ikuaishouSupplyChainService.deleteZhiShuiItemBindCourtshipByDate(date);
+        ikuaishouSupplyChainService.cleanZhiShuiItemBindCourtship(date);
+
+
     }
 
 

+ 10 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaishouSupplyChainMapper.java

@@ -109,4 +109,14 @@ public interface KuaishouSupplyChainMapper extends BaseMapper<KuaishouSupplyChai
     void deleteYuXiuItemBindCourtshipByDate(@Param("date") Long date);
 
     void cleanYuXiuItemBindCourtship(@Param("date") Long date);
+
+    void replaceZhiShuiSupplyChains(@Param("adds") List<KuaishouSupplyChain> zhiShuiSupplyChains);
+
+    void deleteZhiShuiPromoterBindChannelByDate(@Param("date") Long date);
+
+    void cleanZhiShuiKuaiShouPromoterBindChannel(@Param("date") Long date);
+
+    void deleteZhiShuiItemBindCourtshipByDate(@Param("date") Long date);
+
+    void cleanZhiShuiItemBindCourtship(@Param("date") Long date);
 }

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/MgsSupplyChainMapper.java

@@ -29,4 +29,6 @@ public interface MgsSupplyChainMapper extends BaseMapper<KuaishouSupplyChain> {
     void replaceYufuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yufuSupplyChains);
 
     void replaceYuXiuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yuxiuSupplyChains);
+
+    void replaceZhiShuiSupplyChains(@Param("adds")List<KuaishouSupplyChain> zhiShuiSupplyChains);
 }

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/RocketSupplyChainMapper.java

@@ -26,4 +26,6 @@ public interface RocketSupplyChainMapper extends BaseMapper<KuaishouSupplyChain>
     void replaceYufuSupplyChains(@Param(value = "adds")  List<KuaishouSupplyChain> yufuSupplyChains);
 
     void replaceYuXiuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yuxiuSupplyChains);
+
+    void replaceZhiShuiSupplyChains(@Param("adds") List<KuaishouSupplyChain> zhiShuiSupplyChains);
 }

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/YuXiuSupplyChainMapper.java

@@ -18,4 +18,6 @@ public interface YuXiuSupplyChainMapper {
     void replaceYufuSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> yufuSupplyChains);
 
     void replaceYuXiuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yuxiuSupplyChains);
+
+    void replaceZhiShuiSupplyChains(@Param("adds") List<KuaishouSupplyChain> zhiShuiSupplyChains);
 }

+ 2 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/YufuSupplyChainMapper.java

@@ -16,13 +16,6 @@ public interface YufuSupplyChainMapper extends BaseMapper<KuaishouSupplyChain> {
 
     List<JSONObject> getCookie();
 
-
-
-
-
-
-
-
     void replaceRuixuanSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> ruixuanSupplyChains);
 
     void replaceMgsSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> mgsSupplyChains);
@@ -32,4 +25,6 @@ public interface YufuSupplyChainMapper extends BaseMapper<KuaishouSupplyChain> {
     void replaceYufuSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> yufuSupplyChains);
 
     void replaceYuXiuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yuxiuSupplyChains);
+
+    void replaceZhiShuiSupplyChains(@Param("adds")List<KuaishouSupplyChain> zhiShuiSupplyChains);
 }

+ 23 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/ZhiShuiSupplyChainMapper.java

@@ -0,0 +1,23 @@
+package cn.com.ctop.kuaishou.modules.batch.mapper;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouSupplyChain;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ZhiShuiSupplyChainMapper {
+    List<JSONObject> getCookie();
+
+    void replaceRuixuanSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> ruixuanSupplyChains);
+
+    void replaceMgsSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> mgsSupplyChains);
+
+    void replaceRocketSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> rocketSupplyChains);
+
+    void replaceYufuSupplyChains(@Param(value = "adds") List<KuaishouSupplyChain> yufuSupplyChains);
+
+    void replaceYuXiuSupplyChains(@Param("adds") List<KuaishouSupplyChain> yuxiuSupplyChains);
+
+    void replaceZhiShuiSupplyChains(@Param("adds") List<KuaishouSupplyChain> zhiShuiSupplyChains);
+}

+ 103 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouSupplyChainMapper.xml

@@ -327,6 +327,73 @@
 
 
 
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+
+
+    </insert>
+
+
 
 
 
@@ -558,6 +625,32 @@
           AND t1.media_id = 2
         GROUP BY t1.item_id
     </insert>
+    <insert id="cleanZhiShuiKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
+        INSERT INTO zhishui.promoter_bind_channel_date (promoter_id, promoter_name, promoter_url, user_id, user_name,
+                                                        stat_date, media_id)
+        SELECT t1.promoter_id, t1.promoter_nick_name, t1.promoter_url, t1.user_id, t1.user_name, #{date}, media_id
+        FROM zhishui.kuaishou_promoter t1
+                 LEFT JOIN zhishui.sys_user_role t2
+                           ON t1.user_id = t2.user_id
+                 LEFT JOIN zhishui.sys_role t3
+                           ON t2.role_id = t3.role_id
+        WHERE 1 = 1
+          AND t1.media_id = '2'
+          AND t3.role_key IN ('bdManager', 'bd')
+          AND date_format(t1.create_time, '%Y%m%d') &lt; #{date}
+        GROUP BY t1.promoter_id
+
+
+    </insert>
+    <insert id="cleanZhiShuiItemBindCourtship" parameterType="java.lang.Long">
+        INSERT INTO zhishui.item_bind_courtship_date (item_id, item_name, item_url, user_id, user_name, stat_date,
+                                                      media_id)
+        SELECT t1.item_id, t1.item_title, t1.item_img_url, t1.user_id, t1.user_name, #{date}, media_id
+        FROM zhishui.kuaishou_item_list t1
+        WHERE date_format(t1.create_time, '%Y%m%d') &lt; #{date}
+          AND t1.media_id = 2
+        GROUP BY t1.item_id
+    </insert>
     <delete id="deletePromoterBindChannelByDate" parameterType="java.lang.Long">
         delete from ruixuan.promoter_bind_channel_date where stat_date = #{date}
     </delete>
@@ -606,6 +699,16 @@
         WHERE stat_date = #{date}
 
     </delete>
+    <delete id="deleteZhiShuiPromoterBindChannelByDate" parameterType="java.lang.Long">
+        DELETE
+        FROM zhishui.promoter_bind_channel_date
+        WHERE stat_date = #{date}
+    </delete>
+    <delete id="deleteZhiShuiItemBindCourtshipByDate" parameterType="java.lang.Long">
+        DELETE
+        FROM zhishui.item_bind_courtship_date
+        WHERE stat_date = #{date}
+    </delete>
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
 
         select  id ,cookie  from ruixuan.kuaishou_supply_chain_cookie

+ 63 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/MgsSupplyChainMapper.xml

@@ -323,6 +323,69 @@
             )
         </foreach>
     </insert>
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+    </insert>
 
 
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">

+ 63 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/RocketSupplyChainMapper.xml

@@ -323,6 +323,69 @@
         </foreach>
 
     </insert>
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+    </insert>
 
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
 

+ 63 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/YuXiuSupplyChainMapper.xml

@@ -327,6 +327,69 @@
             )
         </foreach>
     </insert>
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+    </insert>
 
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
         SELECT id, cookie

+ 65 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/YufuSupplyChainMapper.xml

@@ -3,8 +3,6 @@
 <mapper namespace="cn.com.ctop.kuaishou.modules.batch.mapper.YufuSupplyChainMapper">
 
 
-
-
     <insert id="replaceRuixuanSupplyChains">
         replace into ruixuan.kuaishou_supply_chain(
         oid,
@@ -328,14 +326,76 @@
 
         </foreach>
     </insert>
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+    </insert>
 
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
 
-        select  id ,cookie  from yufu.kuaishou_supply_chain_cookie
+        SELECT id, cookie
+        FROM yufu.kuaishou_supply_chain_cookie
 
     </select>
 
 
-
-
 </mapper>

+ 399 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/ZhiShuiSupplyChainMapper.xml

@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.kuaishou.modules.batch.mapper.ZhiShuiSupplyChainMapper">
+
+
+    <insert id="replaceRuixuanSupplyChains">
+        replace into ruixuan.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+
+        </foreach>
+
+
+    </insert>
+    <insert id="replaceMgsSupplyChains">
+        replace into miaogousi.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+
+        </foreach>
+    </insert>
+    <insert id="replaceRocketSupplyChains">
+        replace into rocket.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+
+        </foreach>
+
+    </insert>
+    <insert id="replaceYufuSupplyChains">
+        replace into yufu.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+
+        </foreach>
+    </insert>
+    <insert id="replaceYuXiuSupplyChains">
+        replace into yuxiu.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+    </insert>
+    <insert id="replaceZhiShuiSupplyChains">
+        replace into zhishui.kuaishou_supply_chain(
+        oid,
+        item_id,
+        item_title,
+        reserve_price,
+        image_url,
+        order_status,
+        order_create_time,
+        send_status,
+        settlement_biz_type,
+        settlement_biz_type_desc,
+        send_time,
+        recv_time,
+        seller_id,
+        promoter_id,
+        promoter_nick_name,
+        activity_id,
+        order_amount,
+        pay_amount,
+        regimental_promotion_rate,
+        share_rate,
+        base_amount,
+        service_amount,
+        regimental_promotion_amount,
+        total_regimental_settle_amount,
+        stat_date,
+        stat_hour,
+        item_commission_rate
+        )
+        values
+        <foreach collection="adds" item="add" separator=",">
+            (
+            #{add.oid},
+            #{add.itemId},
+            #{add.itemTitle},
+            #{add.reservePrice},
+            #{add.imageUrl},
+            #{add.orderStatus},
+            #{add.orderCreateTime},
+            #{add.sendStatus},
+            #{add.settlementBizType},
+            #{add.settlementBizTypeDesc},
+            #{add.sendTime},
+            #{add.recvTime},
+            #{add.sellerId},
+            #{add.promoterId},
+            #{add.promoterNickName},
+            #{add.activityId},
+            #{add.orderAmount},
+            #{add.payAmount},
+            #{add.regimentalPromotionRate},
+            #{add.shareRate},
+            #{add.baseAmount},
+            #{add.serviceAmount},
+            #{add.regimentalPromotionAmount},
+            #{add.totalRegimentalSettleAmount},
+            #{add.statDate},
+            #{add.statHour},
+            #{add.itemCommissionRate}
+            )
+        </foreach>
+
+    </insert>
+
+    <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT id, cookie
+        FROM zhishui.kuaishou_supply_chain_cookie
+    </select>
+
+
+</mapper>

+ 9 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouSupplyChainService.java

@@ -15,7 +15,7 @@ import java.util.Map;
  * @version V1.0
  */
 public interface IKuaishouSupplyChainService extends IService<KuaishouSupplyChain> {
-    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception;
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
 
     List<JSONObject> getCookie();
 
@@ -88,4 +88,12 @@ public interface IKuaishouSupplyChainService extends IService<KuaishouSupplyChai
     void deleteYuXiuItemBindCourtshipByDate(Long date);
 
     void cleanYuXiuItemBindCourtship(Long date);
+
+    void deleteZhiShuiPromoterBindChannelByDate(Long date);
+
+    void cleanZhiShuiKuaiShouPromoterBindChannel(Long date);
+
+    void deleteZhiShuiItemBindCourtshipByDate(Long date);
+
+    void cleanZhiShuiItemBindCourtship(Long date);
 }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IMgsSupplyChainService.java

@@ -15,7 +15,7 @@ import java.util.Map;
  * @version V1.0
  */
 public interface IMgsSupplyChainService extends IService<KuaishouSupplyChain> {
-    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception;
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
 
     List<JSONObject> getCookie();
 }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IYuXiuSupplyChainService.java

@@ -6,7 +6,7 @@ import java.util.List;
 import java.util.Map;
 
 public interface IYuXiuSupplyChainService {
-    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long,Long> itemMap) throws Exception;
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
 
     List<JSONObject> getCookie();
 }

+ 11 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IZhiShuiSupplyChainService.java

@@ -0,0 +1,11 @@
+package cn.com.ctop.kuaishou.modules.batch.service;
+
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+
+public interface IZhiShuiSupplyChainService {
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
+
+    List<JSONObject> getCookie();
+}

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/RocketSupplyChainService.java

@@ -11,7 +11,7 @@ import java.util.Map;
  * 快手电商-供应链订单信息
  */
 public interface RocketSupplyChainService extends IService<KuaishouSupplyChain> {
-    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long,Long> itemMap) throws Exception;
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
 
     List<JSONObject> getCookie();
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/YufuSupplyChainService.java

@@ -11,7 +11,7 @@ import java.util.Map;
  * 快手电商-供应链订单信息
  */
 public interface YufuSupplyChainService extends IService<KuaishouSupplyChain> {
-    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long,Long> itemMap) throws Exception;
+    void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception;
 
     List<JSONObject> getCookie();
 

+ 34 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouSupplyChainServiceImpl.java

@@ -55,7 +55,7 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
 
     @Transactional
     @Override
-    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception {
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
         Thread.sleep(1500);
         log.info("567团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
         Map<String, Object> params = new HashMap<>();
@@ -101,6 +101,7 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
         List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
         for (int i = 0; i < list.size(); i++) {
             JSONObject jsonObject = list.getJSONObject(i);
             KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
@@ -135,7 +136,6 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
             supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
             supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
-            supplyChain.setItemCommissionRate(itemMap.get(item.getLong("itemId")));
             Criteria criteria = new Criteria();
             criteria = Criteria.where("_id").is(itemId);
             Query query = new Query(criteria);
@@ -161,6 +161,11 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
                     yuxiuSupplyChains.add(supplyChain);
                 }
 
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
+
+
             }
 
         }
@@ -185,12 +190,17 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
                 supplyChainMapper.replaceYuXiuSupplyChains(yuxiuSupplyChains);
             }
 
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                supplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
+
+
         } catch (Exception e) {
             e.printStackTrace();
         }
 
         if (list.size() >= 100) {
-            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
         }
 
     }
@@ -305,7 +315,7 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
     public void getSellerInfo(String cookie, Integer offset, String db, String date) throws InterruptedException {
         Thread.sleep(2000);
         Map<String, Object> params = new HashMap<>();
-        params.put("startDate",date);
+        params.put("startDate", date);
         params.put("endDate", date);
         params.put("limit", 20);
         params.put("offset", offset);
@@ -428,6 +438,26 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
         supplyChainMapper.cleanYuXiuItemBindCourtship(date);
     }
 
+    @Override
+    public void deleteZhiShuiPromoterBindChannelByDate(Long date) {
+        supplyChainMapper.deleteZhiShuiPromoterBindChannelByDate(date);
+    }
+
+    @Override
+    public void cleanZhiShuiKuaiShouPromoterBindChannel(Long date) {
+        supplyChainMapper.cleanZhiShuiKuaiShouPromoterBindChannel(date);
+    }
+
+    @Override
+    public void deleteZhiShuiItemBindCourtshipByDate(Long date) {
+        supplyChainMapper.deleteZhiShuiItemBindCourtshipByDate(date);
+    }
+
+    @Override
+    public void cleanZhiShuiItemBindCourtship(Long date) {
+        supplyChainMapper.cleanZhiShuiItemBindCourtship(date);
+    }
+
 
     @Override
     public List<JSONObject> getCookie() {

+ 11 - 16
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/MgsSupplyChainServiceImpl.java

@@ -55,7 +55,7 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
 
     @Transactional
     @Override
-    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception {
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
         Thread.sleep(1000);
         log.info("mgs团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
         Map<String, Object> params = new HashMap<>();
@@ -101,6 +101,7 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
         List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
         for (int i = 0; i < list.size(); i++) {
             JSONObject jsonObject = list.getJSONObject(i);
             KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
@@ -135,8 +136,6 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
             supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
             supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
-            supplyChain.setItemCommissionRate(itemMap.get(item.getLong("itemId")));
-
             Criteria criteria = new Criteria();
             criteria = Criteria.where("_id").is(itemId);
             Query query = new Query(criteria);
@@ -161,6 +160,9 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
                 if ("yuxiu".equals(ownership)) {
                     yuxiuSupplyChains.add(supplyChain);
                 }
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
 
             }
         }
@@ -184,12 +186,17 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
                 mgsSupplyChainMapper.replaceYuXiuSupplyChains(yuxiuSupplyChains);
             }
 
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                mgsSupplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
+
+
         } catch (Exception e) {
             e.printStackTrace();
         }
 
         if (list.size() >= 100) {
-            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
         }
 
     }
@@ -200,18 +207,6 @@ public class MgsSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChainMa
     }
 
 
-
-
-
-
-
-
-
-
-
-
-
-
     public static String filterSupplement(String content) {
         StringBuilder sb = new StringBuilder();
         for (char ch : content.toCharArray()) {

+ 10 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/RocketSupplyChainServiceImpl.java

@@ -52,7 +52,7 @@ public class RocketSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChai
 
     @Transactional
     @Override
-    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception {
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
         Thread.sleep(1000);
         log.info("rocket团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
         Map<String, Object> params = new HashMap<>();
@@ -98,6 +98,7 @@ public class RocketSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChai
         List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
         for (int i = 0; i < list.size(); i++) {
             JSONObject jsonObject = list.getJSONObject(i);
             KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
@@ -132,7 +133,6 @@ public class RocketSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChai
             supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
             supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
-            supplyChain.setItemCommissionRate(itemMap.get(item.getLong("itemId")));
             Criteria criteria = new Criteria();
             criteria = Criteria.where("_id").is(itemId);
             Query query = new Query(criteria);
@@ -157,10 +157,10 @@ public class RocketSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChai
                 if ("yuxiu".equals(ownership)) {
                     yuxiuSupplyChains.add(supplyChain);
                 }
-
-
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
             }
-
         }
         try {
             if (!Check.isNull(ruixuanSupplyChains)) {
@@ -182,13 +182,17 @@ public class RocketSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyChai
             if (!Check.isNull(yuxiuSupplyChains)) {
                 rocketSupplyChainMapper.replaceYuXiuSupplyChains(yuxiuSupplyChains);
             }
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                rocketSupplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
+
 
         } catch (Exception e) {
             e.printStackTrace();
         }
 
         if (list.size() >= 100) {
-            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
         }
 
     }

+ 11 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/YuXiuSupplyChainServiceImpl.java

@@ -42,7 +42,7 @@ public class YuXiuSupplyChainServiceImpl implements IYuXiuSupplyChainService {
 
     @Transactional
     @Override
-    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception {
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
         Thread.sleep(1000);
         log.info("yuxiu团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
         Map<String, Object> params = new HashMap<>();
@@ -88,6 +88,7 @@ public class YuXiuSupplyChainServiceImpl implements IYuXiuSupplyChainService {
         List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
         for (int i = 0; i < list.size(); i++) {
             JSONObject jsonObject = list.getJSONObject(i);
             KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
@@ -122,7 +123,6 @@ public class YuXiuSupplyChainServiceImpl implements IYuXiuSupplyChainService {
             supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
             supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
-            supplyChain.setItemCommissionRate(itemMap.get(item.getLong("itemId")));
             Criteria criteria = new Criteria();
             criteria = Criteria.where("_id").is(itemId);
             Query query = new Query(criteria);
@@ -147,6 +147,10 @@ public class YuXiuSupplyChainServiceImpl implements IYuXiuSupplyChainService {
                 if ("yufu".equals(ownership)) {
                     yufuSupplyChains.add(supplyChain);
                 }
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
+
             }
 
         }
@@ -171,11 +175,15 @@ public class YuXiuSupplyChainServiceImpl implements IYuXiuSupplyChainService {
             if (!Check.isNull(rocketSupplyChains)) {
                 yuXiuSupplyChainMapper.replaceRocketSupplyChains(rocketSupplyChains);
             }
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                yuXiuSupplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
+
         } catch (Exception e) {
             e.printStackTrace();
         }
         if (list.size() >= 100) {
-            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
         }
 
     }

+ 9 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/YufuSupplyChainServiceImpl.java

@@ -50,7 +50,7 @@ public class YufuSupplyChainServiceImpl extends ServiceImpl<YufuSupplyChainMappe
 
     @Transactional
     @Override
-    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd, Map<Long, Long> itemMap) throws Exception {
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
         Thread.sleep(1000);
         log.info("yufu团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
         Map<String, Object> params = new HashMap<>();
@@ -96,7 +96,7 @@ public class YufuSupplyChainServiceImpl extends ServiceImpl<YufuSupplyChainMappe
         List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
         List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
-
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
         for (int i = 0; i < list.size(); i++) {
             JSONObject jsonObject = list.getJSONObject(i);
             KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
@@ -131,7 +131,6 @@ public class YufuSupplyChainServiceImpl extends ServiceImpl<YufuSupplyChainMappe
             supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
             supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
-            supplyChain.setItemCommissionRate(itemMap.get(item.getLong("itemId")));
             Criteria criteria = new Criteria();
             criteria = Criteria.where("_id").is(itemId);
             Query query = new Query(criteria);
@@ -156,6 +155,9 @@ public class YufuSupplyChainServiceImpl extends ServiceImpl<YufuSupplyChainMappe
                 if ("yuxiu".equals(ownership)) {
                     yuxiuSupplyChains.add(supplyChain);
                 }
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
             }
 
         }
@@ -178,11 +180,14 @@ public class YufuSupplyChainServiceImpl extends ServiceImpl<YufuSupplyChainMappe
             if (!Check.isNull(yuxiuSupplyChains)) {
                 yufuSupplyChainMapper.replaceYuXiuSupplyChains(yuxiuSupplyChains);
             }
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                yufuSupplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }
         if (list.size() >= 100) {
-            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
         }
 
     }

+ 198 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/ZhiShuiSupplyChainServiceImpl.java

@@ -0,0 +1,198 @@
+package cn.com.ctop.kuaishou.modules.batch.service.impl;
+
+import cn.com.ctop.common.module.service.ISendMessageService;
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouSupplyChain;
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.ItemCheck;
+import cn.com.ctop.kuaishou.modules.batch.mapper.YuXiuSupplyChainMapper;
+import cn.com.ctop.kuaishou.modules.batch.mapper.ZhiShuiSupplyChainMapper;
+import cn.com.ctop.kuaishou.modules.batch.service.IYuXiuSupplyChainService;
+import cn.com.ctop.kuaishou.modules.batch.service.IZhiShuiSupplyChainService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@Slf4j
+public class ZhiShuiSupplyChainServiceImpl implements IZhiShuiSupplyChainService {
+
+    private static String url = "https://cps.kwaixiaodian.com/distribute/pc/investment/order/list";
+    @Autowired
+    private ISendMessageService sendMessageService;
+    @Autowired
+    private ZhiShuiSupplyChainMapper zhiShuiSupplyChainMapper;
+    @Autowired
+    private MongoTemplate mongoTemplate;
+
+
+    @Transactional
+    @Override
+    public void getOrderList(String cookie, Integer offset, Long orderCreateTimeStart, Long orderCreateTimeEnd) throws Exception {
+        Thread.sleep(1000);
+        log.info("zhishui团长抓取订单数据入参,开始时间:{},结束时间:{},数据:{}", DateUtils.tempToLongDateStr(orderCreateTimeStart), DateUtils.tempToLongDateStr(orderCreateTimeEnd), offset);
+        Map<String, Object> params = new HashMap<>();
+        if (!Check.isNull(orderCreateTimeStart)) {
+            params.put("orderCreateTimeStart", orderCreateTimeStart);
+        }
+        if (!Check.isNull(orderCreateTimeEnd)) {
+            params.put("orderCreateTimeEnd", orderCreateTimeEnd);
+        }
+        params.put("fundType", 1);
+        params.put("timeType", 1);
+        params.put("limit", 100);
+        params.put("offset", offset);
+
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Cookie", cookie);
+
+        String resultStr = HttpUtils.KuaiShouttpGetRequest(url, params, headers);
+        JSONObject result = JSONObject.parseObject(resultStr);
+        if (Check.isNull(result)) {
+            log.error("快分销数据返回为空");
+            return;
+        }
+        Integer code = result.getInteger("result");
+        if (code != 1) {
+            log.info("zhishui快分销数据返回异常:", resultStr);
+            sendMessageService.sendMessage("113dee46c7df464da78c07a985e92cd1", "zhishuicookie失效,请及时更新。媒体返回信息:" + resultStr);
+            return;
+        }
+        JSONObject dataJson = result.getJSONObject("data");
+        if (Check.isNull(dataJson)) {
+            log.error("zhishui数据返回为data数据为空");
+            return;
+        }
+        JSONArray list = dataJson.getJSONArray("list");
+        if (Check.isNull(list)) {
+            log.error("zhishui数据返回为list数据为空");
+            return;
+        }
+        log.info("zhishui当前数据条数:{}", list.size());
+        List<KuaishouSupplyChain> ruixuanSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> mgsSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> rocketSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> yufuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> yuxiuSupplyChains = new ArrayList<>();
+        List<KuaishouSupplyChain> zhiShuiSupplyChains = new ArrayList<>();
+        for (int i = 0; i < list.size(); i++) {
+            JSONObject jsonObject = list.getJSONObject(i);
+            KuaishouSupplyChain supplyChain = new KuaishouSupplyChain();
+            supplyChain.setOid(jsonObject.getLong("oid"));
+            JSONObject item = jsonObject.getJSONArray("itemList").getJSONObject(0);
+            Long itemId = null;
+            if (!Check.isNull(item)) {
+                itemId = item.getLong("itemId");
+                supplyChain.setItemId(itemId);
+                supplyChain.setItemTitle(item.getString("itemTitle"));
+                supplyChain.setReservePrice(item.getLong("reservePrice"));
+                supplyChain.setImageUrl(item.getString("imageUrl"));
+            }
+            supplyChain.setOrderStatus(jsonObject.getInteger("orderStatus"));
+            supplyChain.setOrderCreateTime(jsonObject.getLong("orderCreateTime"));
+            supplyChain.setSendStatus(jsonObject.getInteger("sendStatus"));
+            supplyChain.setSettlementBizType(jsonObject.getInteger("settlementBizType"));
+            supplyChain.setSettlementBizTypeDesc(jsonObject.getString("settlementBizTypeDesc"));
+            supplyChain.setSendTime(jsonObject.getLong("sendTime"));
+            supplyChain.setRecvTime(jsonObject.getLong("recvTime"));
+            supplyChain.setSellerId(jsonObject.getLong("sellerId"));
+            supplyChain.setPromoterId(jsonObject.getLong("promoterId"));
+            supplyChain.setPromoterNickName(filterSupplement(jsonObject.getString("promoterNickName")));
+            supplyChain.setActivityId(jsonObject.getLong("activityId"));
+            supplyChain.setOrderAmount(jsonObject.getLong("orderAmount"));
+            supplyChain.setPayAmount(jsonObject.getLong("payAmount"));
+            supplyChain.setRegimentalPromotionRate(jsonObject.getLong("regimentalPromotionRate"));
+            supplyChain.setShareRate(jsonObject.getLong("shareRate"));
+            supplyChain.setBaseAmount(jsonObject.getLong("baseAmount"));
+            supplyChain.setServiceAmount(jsonObject.getLong("serviceAmount"));
+            supplyChain.setRegimentalPromotionAmount(jsonObject.getLong("regimentalPromotionAmount"));
+            supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
+            supplyChain.setStatDate(DateUtils.tempToDateLong(jsonObject.getLong("orderCreateTime")));
+            supplyChain.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
+            Criteria criteria = new Criteria();
+            criteria = Criteria.where("_id").is(itemId);
+            Query query = new Query(criteria);
+            ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
+            if (Check.isNull(itemCheck)) {
+                zhiShuiSupplyChains.add(supplyChain);
+            }
+            if (!Check.isNull(itemCheck)) {
+                String ownership = itemCheck.getOwnership();
+                if ("zhishui".equals(ownership)) {
+                    zhiShuiSupplyChains.add(supplyChain);
+                }
+                if ("ruixuan".equals(ownership)) {
+                    ruixuanSupplyChains.add(supplyChain);
+                }
+                if ("miaogousi".equals(ownership)) {
+                    mgsSupplyChains.add(supplyChain);
+                }
+                if ("rocket".equals(ownership)) {
+                    rocketSupplyChains.add(supplyChain);
+                }
+                if ("yufu".equals(ownership)) {
+                    yufuSupplyChains.add(supplyChain);
+                }
+                if ("yuxiu".equals(ownership)) {
+                    yuxiuSupplyChains.add(supplyChain);
+                }
+            }
+
+        }
+        try {
+            if (!Check.isNull(zhiShuiSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceZhiShuiSupplyChains(zhiShuiSupplyChains);
+            }
+            if (!Check.isNull(ruixuanSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceRuixuanSupplyChains(ruixuanSupplyChains);
+            }
+            if (!Check.isNull(mgsSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceMgsSupplyChains(mgsSupplyChains);
+            }
+
+            if (!Check.isNull(rocketSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceRocketSupplyChains(rocketSupplyChains);
+            }
+            if (!Check.isNull(yuxiuSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceYuXiuSupplyChains(yuxiuSupplyChains);
+            }
+            if (!Check.isNull(yufuSupplyChains)) {
+                zhiShuiSupplyChainMapper.replaceYufuSupplyChains(yufuSupplyChains);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (list.size() >= 100) {
+            getOrderList(cookie, offset + 100, orderCreateTimeStart, orderCreateTimeEnd);
+        }
+
+    }
+
+    @Override
+    public List<JSONObject> getCookie() {
+        return zhiShuiSupplyChainMapper.getCookie();
+    }
+
+
+    public static String filterSupplement(String content) {
+        StringBuilder sb = new StringBuilder();
+        for (char ch : content.toCharArray()) {
+            if (!Character.isHighSurrogate(ch) && !Character.isLowSurrogate(ch)) {
+                sb.append(ch);
+            }
+        }
+        return sb.toString();
+    }
+}