|
|
@@ -163,7 +163,7 @@ public class KuaiShouAdSocialServiceImpl implements IKuaiShouAdSocialService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void getOrderDailyData(String accessToken, Long advertiserId, Long taskId, List<String> orderIds, String startDate, String endDate, Integer isLog, Long errId, Integer isSend) {
|
|
|
+ public void getOrderDailyData(String accessToken, Long advertiserId, Long taskId, List<String> orderIds, String startDate, String endDate, Integer isLog, Long errId, Integer isSend, Integer retry) {
|
|
|
String url = KuaishouLinkConstants.KS_PREFIX + KuaishouLinkConstants.AD_SOCIAL_ORDER_DAILY_DATA;
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
|
@@ -189,6 +189,17 @@ public class KuaiShouAdSocialServiceImpl implements IKuaiShouAdSocialService {
|
|
|
Integer code = resultJson.getInteger("code");
|
|
|
String message = resultJson.getString("message");
|
|
|
if (null == code || code != 0) {
|
|
|
+ if (retry <= 3) {
|
|
|
+ try {
|
|
|
+ Thread.sleep(500L);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ log.info("获取快手星任务(视频)-订单分天数据异常重试次数:{},accountId:{},taskId:{},orderIds:{}", retry, advertiserId, taskId, orderIds);
|
|
|
+ retry++;
|
|
|
+ getOrderDailyData(accessToken, advertiserId, taskId, orderIds, startDate, endDate, isLog, errId, isSend, retry);
|
|
|
+ return;
|
|
|
+ }
|
|
|
log.error("获取快手星任务(视频)-订单分天数据异常:{},accountId:{},taskId:{},orderIds:{}", message, advertiserId, taskId, orderIds);
|
|
|
if (isLog != null && isLog == 1) {
|
|
|
errorLogService.addError(System.currentTimeMillis(), startDate, endDate, "ad_social_order_daily_data", "daily",
|