yumeng 1 год назад
Родитель
Сommit
5c17bfd52a

+ 16 - 8
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/BytedanceController.java

@@ -88,16 +88,24 @@ public class BytedanceController {
 
 
     @GetMapping("/getChannel")
-    public void getChannel(@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate) {
+    public void getChannel() {
         List<JSONObject> channelList = promoterReportService.getChannelInfoList();
-        startDate = startDate == null ? DateUtils.getNowAddDate("yyyy-MM-dd", -1) : startDate;
-        endDate = endDate == null ? DateUtils.getNowDate("yyyy-MM-dd") : endDate;
-        for (int i = 0; i < channelList.size(); i++) {
-            JSONObject jsonObject = channelList.get(i);
-            String channelAccountId = jsonObject.getString("channelAccountId");
-            String secretKey = jsonObject.getString("secretKey");
-            channelService.getPromotionIdList(startDate, endDate, channelAccountId, secretKey, 0);
+/*        startDate = startDate == null ? DateUtils.getNowAddDate("yyyy-MM-dd", -1) : startDate;
+        endDate = endDate == null ? DateUtils.getNowDate("yyyy-MM-dd") : endDate;*/
+
+        List<String> days = DateUtils.getDays("2025-01-01", "2025-03-17");
+        for (int i = 0; i < days.size(); i++) {
+            String s = days.get(i);
+            for (int j = 0; j < channelList.size(); j++) {
+                JSONObject jsonObject = channelList.get(j);
+                String channelAccountId = jsonObject.getString("channelAccountId");
+                String secretKey = jsonObject.getString("secretKey");
+                channelService.getPromotionIdList(s, s, channelAccountId, secretKey, 0);
+            }
         }
+
+
+
     }
 
 

+ 12 - 12
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/entity/ChannelChangdunovelInfo.java

@@ -17,7 +17,7 @@ public class ChannelChangdunovelInfo {
      * 推广链id
      */
     private Long distributorId;
-    private Long promotionId;
+    private String promotionId;
 
     /**
      * 推广链别名
@@ -59,11 +59,19 @@ public class ChannelChangdunovelInfo {
      */
     private String promotionHttpUrl;
 
-    public Long getPromotionId() {
+    public Long getDistributorId() {
+        return distributorId;
+    }
+
+    public void setDistributorId(Long distributorId) {
+        this.distributorId = distributorId;
+    }
+
+    public String getPromotionId() {
         return promotionId;
     }
 
-    public void setPromotionId(Long promotionId) {
+    public void setPromotionId(String promotionId) {
         this.promotionId = promotionId;
     }
 
@@ -103,14 +111,6 @@ public class ChannelChangdunovelInfo {
         return monitorUrl;
     }
 
-    public Long getDistributorId() {
-        return distributorId;
-    }
-
-    public void setDistributorId(Long distributorId) {
-        this.distributorId = distributorId;
-    }
-
     public void setMonitorUrl(String monitorUrl) {
         this.monitorUrl = monitorUrl;
     }
@@ -143,7 +143,7 @@ public class ChannelChangdunovelInfo {
     public String toString() {
         return "ChannelChangdunovelInfo{" +
                 "distributorId=" + distributorId +
-                ", promotionId=" + promotionId +
+                ", promotionId='" + promotionId + '\'' +
                 ", promotionName='" + promotionName + '\'' +
                 ", movieId=" + movieId +
                 ", movieName='" + movieName + '\'' +