|
@@ -557,7 +557,7 @@ public class KuaiShouDramaServiceImpl implements IKuaiShouDramaService {
|
|
|
int batchSize = 20;
|
|
int batchSize = 20;
|
|
|
for (int i = 0; i < seriesIds.size(); i += batchSize) {
|
|
for (int i = 0; i < seriesIds.size(); i += batchSize) {
|
|
|
List<Long> batchSeriesIds = seriesIds.subList(i, Math.min(i + batchSize, seriesIds.size()));
|
|
List<Long> batchSeriesIds = seriesIds.subList(i, Math.min(i + batchSize, seriesIds.size()));
|
|
|
- queryEpisodeReportBySeriesIds(accessToken, advertiserId, startDate, endDate, batchSeriesIds, 1, isLog, errId, isSend);
|
|
|
|
|
|
|
+ queryEpisodeReportBySeriesIds(accessToken, advertiserId, startDate, endDate, batchSeriesIds, 1, isLog);
|
|
|
}
|
|
}
|
|
|
log.info("【{}】录入快手短剧剧集报表数据完成 {} {}", advertiserId, startDate, endDate);
|
|
log.info("【{}】录入快手短剧剧集报表数据完成 {} {}", advertiserId, startDate, endDate);
|
|
|
if (errId != null) {
|
|
if (errId != null) {
|
|
@@ -568,7 +568,8 @@ public class KuaiShouDramaServiceImpl implements IKuaiShouDramaService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void queryEpisodeReportBySeriesIds(String accessToken, Long advertiserId, String startDate, String endDate, List<Long> seriesIds, int page, Integer isLog, Long errId, Integer isSend) {
|
|
|
|
|
|
|
+ private void queryEpisodeReportBySeriesIds(String accessToken, Long advertiserId, String startDate, String endDate, List<Long> seriesIds, int page, Integer isLog) {
|
|
|
|
|
+ log.info("获取快手短剧剧集报表:accountId:{} startDate:{} endDate:{} seriesIds:{}", advertiserId, startDate, endDate, seriesIds);
|
|
|
String url = KuaishouLinkConstants.KS_PREFIX + KuaishouLinkConstants.DRAMA_EPISODE_REPORT;
|
|
String url = KuaishouLinkConstants.KS_PREFIX + KuaishouLinkConstants.DRAMA_EPISODE_REPORT;
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Content-Type", "application/json");
|
|
@@ -615,7 +616,7 @@ public class KuaiShouDramaServiceImpl implements IKuaiShouDramaService {
|
|
|
report.setAccountId(detailJson.getString("account_id"));
|
|
report.setAccountId(detailJson.getString("account_id"));
|
|
|
report.setResourceType(detailJson.getString("resource_type"));
|
|
report.setResourceType(detailJson.getString("resource_type"));
|
|
|
report.setIsPayEpisode(detailJson.getInteger("is_pay_episode"));
|
|
report.setIsPayEpisode(detailJson.getInteger("is_pay_episode"));
|
|
|
- report.setSeriesPayTemplateId(detailJson.getString("series_pay_template_id"));
|
|
|
|
|
|
|
+ report.setSeriesPayTemplateId(detailJson.getString("series_pay_template_id") == null ? "0" : detailJson.getString("series_pay_template_id"));
|
|
|
report.setShowCnt(detailJson.getInteger("show_cnt"));
|
|
report.setShowCnt(detailJson.getInteger("show_cnt"));
|
|
|
report.setPlayCnt(detailJson.getInteger("play_cnt"));
|
|
report.setPlayCnt(detailJson.getInteger("play_cnt"));
|
|
|
report.setCompletePlayCnt(detailJson.getInteger("complete_play_cnt"));
|
|
report.setCompletePlayCnt(detailJson.getInteger("complete_play_cnt"));
|
|
@@ -629,7 +630,7 @@ public class KuaiShouDramaServiceImpl implements IKuaiShouDramaService {
|
|
|
kuaiShouDramaMapper.insertEpisodeReport(addList);
|
|
kuaiShouDramaMapper.insertEpisodeReport(addList);
|
|
|
}
|
|
}
|
|
|
if (page < totalPage) {
|
|
if (page < totalPage) {
|
|
|
- queryEpisodeReportBySeriesIds(accessToken, advertiserId, startDate, endDate, seriesIds, page + 1, isLog, errId, isSend);
|
|
|
|
|
|
|
+ queryEpisodeReportBySeriesIds(accessToken, advertiserId, startDate, endDate, seriesIds, page + 1, isLog);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|