yumeng 2 년 전
부모
커밋
bc7aa3279b

+ 20 - 22
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouOrderLIstGetJob.java

@@ -89,39 +89,37 @@ public class KuaishouOrderLIstGetJob {
 
 
     /**
-     * 当天前前小时数据获取
+     * 当天数据获取
      **/
     @XxlJob("frontHourOrderGet")
     public void frontHourOrderGet() throws Exception {
-        log.info("-------------------------获取快分销订单当天前一小时数据开始--------------------------");
+        log.info("-------------------------获取快分销订单当天数据开始--------------------------");
         String cookie = ikuaishouSupplyChainService.getCookie();
         if (Check.isNull(cookie)) {
             log.error("cookie数据为空");
             return;
         }
         String date = DateUtils.getNowDate("yyyy-MM-dd");
-        Integer nowHour = DateUtils.getNowHour();
-        Integer hour = null;
-        if (nowHour == 0) {
-            date = DateUtils.getAnotherDay("yyyy-MM-dd", date, -1);
-            hour = 23;
-        } else {
-            hour = nowHour - 1;
-        }
+        JSONArray hourList = KuaishouHourEnum.getHourList();
         JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
-        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();
-            ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+        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();
+                ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
+            }
         }
+
+
     }
 
 

+ 0 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/agent/mapper/xml/CtopAgentAccountMapper.xml

@@ -28,7 +28,6 @@
                 LEFT JOIN ctop_user_allocation u ON a.account_id = u.account_id
         WHERE
             a.state = 0
-          AND u.account_status = 0
     </select>
     <!-- 根据账户id修改账户状态-->
     <update id="updateAccountState">

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/agent/service/impl/AgentManagementServiceImpl.java

@@ -276,9 +276,9 @@ public class AgentManagementServiceImpl implements AgentManagementService {
         ca.add(Calendar.DATE, -1);
 
         try {
-            List<String> accountIdList = userAllocationService.getAccountListByProjectV2(12630885L);
+         //   List<String> accountIdList = userAllocationService.getAccountListByProjectV2(11940886L);
 
-         //   List<String> accountIdList = ctopAgentAccountMapper.getAllAccountId();
+            List<String> accountIdList = ctopAgentAccountMapper.getAllAccountId();
 //            List<String> accountIdList = new ArrayList<>();
             //accountIdList.add("1744115510360071");
             if (!accountIdList.isEmpty()) {