yumeng 1 vuosi sitten
vanhempi
commit
8371a91c05

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

@@ -164,28 +164,27 @@ public class TestController {
     @Autowired
     private IJiaoYangFenXiaoService jiaoYangFenXiaoService;
 
+    @Autowired
+    private IMgsSupplyChainService mgsSupplyChainService;
 
 
 
+    @GetMapping(value = "/getData")
+    public void getDate() throws Exception {
 
+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
+        String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -10);
+        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        List<String> days = DateUtils.getDays(startDate, endDate);
 
-    @GetMapping(value = "/getData")
-    public void getDate(String startDate, String endDate) throws Exception {
-
-        //   List<String> dateList = new ArrayList<>();
-        Map<String, String> monthStartAndEnd = DateUtils.getMonthStartAndEnd();
-        String firstDay = monthStartAndEnd.get("firstDay");
-        String lastDay = monthStartAndEnd.get("lastDay");
-        List<String> days = DateUtils.getDays("2024-06-03", "2024-06-30");
-        List<JSONObject> cookies = jiaoYangFenXiaoService.getCookie();
+        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++) {
@@ -196,15 +195,16 @@ public class TestController {
                     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");
-                        jiaoYangFenXiaoService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+                        mgsSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, itemMap);
+
+
+
                     }
                 }
             }
@@ -1886,8 +1886,7 @@ public class TestController {
 
     @GetMapping("getBalance")
     public void getBalance(Long accountId) throws Exception {
-        save();
-        find();
+
     }
 
    /* public void save() {