Kaynağa Gözat

Merge #41 into master from pingkang

Merge branch 'master' of codeup.aliyun.com:60c06368dbbed34fe0f0c263/job/hr_job-...

* pingkang: (2 commits)
  优化快手广告组拉取
  Merge branch 'master' of codeup.aliyun.com:60c06368dbbed34fe0f0c263/job/hr_job-...

Signed-off-by: 黄平康 <accounts_6361eaad7b63b44dd7833e63@mail.teambition.com>
Merged-by: 黄平康 <accounts_6361eaad7b63b44dd7833e63@mail.teambition.com>

CR-link: https://codeup.aliyun.com/60c06368dbbed34fe0f0c263/job/hr_job-kuaishou/change/41
huangpingkang 1 yıl önce
ebeveyn
işleme
6cc1b72f69

+ 1 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/controller/KuaiShouController.java

@@ -106,7 +106,7 @@ public class KuaiShouController {
                 public void run() {
                     Long advertiserId = jsonObject.getLong("advertiser_id");
                     String accessToken = jsonObject.getString("access_token");
-                    groupReportService.queryGroupList(accessToken, advertiserId, startDate, endDate, 1, 1, null, 2);
+                    groupReportService.queryGroupList(accessToken, advertiserId, null, null, 1, 1, null, 2);
                 }
             });
         }

+ 2 - 2
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/impl/KuaiShouGroupReportServiceImpl.java

@@ -188,7 +188,7 @@ public class KuaiShouGroupReportServiceImpl implements IKuaiShouGroupReportServi
         String result = HttpUtils.httpPostRequest(url, param, headers);
         if (Check.isNull(result)) {
             log.error("获取快手广告组异常,返回为空, accountId:{}", advertiserId);
-            errorLogService.addError(advertiserId, startDate, endDate, "group_list", "daily", "返回为空", 2);
+            errorLogService.addError(advertiserId, !Check.isNull(startDate) ? startDate : "-", !Check.isNull(endDate) ? endDate : "-", "group_list", "daily", "返回为空", 2);
             return;
         }
         JSONObject resultJson = JSONObject.parseObject(result);
@@ -196,7 +196,7 @@ public class KuaiShouGroupReportServiceImpl implements IKuaiShouGroupReportServi
         String message = resultJson.getString("message");
         if (null == code || code != 0) {
             log.error("获取快手广告组异常:{},accountId:{}", message, advertiserId);
-            errorLogService.addError(advertiserId, startDate, endDate, "group_list", "daily", message, 2);
+            errorLogService.addError(advertiserId, !Check.isNull(startDate) ? startDate : "-", !Check.isNull(endDate) ? endDate : "-", "group_list", "daily", message, 2);
             return;
         }
         JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");

+ 1 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaiShouGroupReportJob.java

@@ -106,7 +106,7 @@ public class KuaiShouGroupReportJob {
         yesGroupexecutorService.submit(new Runnable() {
             @Override
             public void run() {
-                groupReportService.queryGroupList(accessToken, advertiserId, yesDate, nowDate, 1, 1, null, 2);
+                groupReportService.queryGroupList(accessToken, advertiserId, null, null, 1, 1, null, 2);
             }
         });
     }

+ 1 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaiShouRetryReportJob.java

@@ -119,7 +119,7 @@ public class KuaiShouRetryReportJob {
                         @Override
                         public void run() {
                             if (!Check.isNull(accessToken)) {
-                                groupReportService.queryGroupList(accessToken, advertiserId, startDate, endDate, 1, null, id, isSend);
+                                groupReportService.queryGroupList(accessToken, advertiserId, null, null, 1, null, id, isSend);
                             }
                         }
                     });