|
@@ -744,7 +744,7 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
|
if(!Check.isNull(json)){
|
|
|
Integer code = json.getInteger("code");
|
|
|
if(code != 0){
|
|
|
- log.info("返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + ",message:"+ json.getString("message"));
|
|
|
+ log.error("返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + ",message:"+ json.getString("message"));
|
|
|
return;
|
|
|
}
|
|
|
JSONObject dataJson = json.getJSONObject("data");
|
|
@@ -810,13 +810,13 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
|
|
|
|
try {
|
|
|
String jsonString = JSON.toJSONString(json);
|
|
|
- log.info("返回json为" + jsonString);
|
|
|
+ //log.info("返回json为" + jsonString);
|
|
|
|
|
|
if(!Check.isNull(json)){
|
|
|
Integer code = json.getInteger("code");
|
|
|
if(code != 0){
|
|
|
log.info("获取任务列表返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + "taskId:" + task.getTaskId());
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
|
|
|
JSONObject jsonData = json.getJSONObject("data");
|
|
@@ -834,11 +834,11 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
|
bytedanceAsyncTaskDownload(task,token,task.getType());
|
|
|
task.setIsDownload(1);
|
|
|
}
|
|
|
- task.setTaskStatus(taskStatus);
|
|
|
- bytedanceDailyReportTaskMapper.updateById(task);
|
|
|
+ task.setTaskStatus(taskStatus);
|
|
|
+ bytedanceDailyReportTaskMapper.updateById(task);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -944,155 +944,155 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
|
|
|
|
int returnCode = 200;
|
|
|
try {
|
|
|
- if(!Check.isNull(json)){
|
|
|
- Integer code = json.getInteger("code");
|
|
|
- if(code != 0){
|
|
|
- log.error("获取任务列表返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + ";返回json为:" + JSONObject.toJSONString(data));
|
|
|
- //returnCode = -1;
|
|
|
- return -1;
|
|
|
- }
|
|
|
+ if(!Check.isNull(json)){
|
|
|
+ Integer code = json.getInteger("code");
|
|
|
+ if(code != 0){
|
|
|
+ log.error("获取任务列表返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + ";返回json为:" + JSONObject.toJSONString(data));
|
|
|
+ //returnCode = -1;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
|
|
|
- JSONObject jsonData = json.getJSONObject("data");
|
|
|
- if (Check.isNull(jsonData)){
|
|
|
- log.error("获取任务列表返回信息data内容为空");
|
|
|
- return -1;
|
|
|
- }
|
|
|
- JSONObject pageInfo = jsonData.getJSONObject("page_info");
|
|
|
- Integer totalPage = pageInfo.getInteger("total_page");
|
|
|
- Integer currentPage = pageInfo.getInteger("page");
|
|
|
-
|
|
|
- JSONArray jsonArrayay = jsonData.getJSONArray("list");
|
|
|
- if(jsonArrayay.size() == 0){
|
|
|
- log.info("accountId:" + accountId + ";没有数据。总页数为:" + totalPage + "当前页数为:" + currentPage);
|
|
|
- //returnCode = 1;
|
|
|
- return 1;
|
|
|
- }
|
|
|
+ JSONObject jsonData = json.getJSONObject("data");
|
|
|
+ if (Check.isNull(jsonData)){
|
|
|
+ log.error("获取任务列表返回信息data内容为空");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ JSONObject pageInfo = jsonData.getJSONObject("page_info");
|
|
|
+ Integer totalPage = pageInfo.getInteger("total_page");
|
|
|
+ Integer currentPage = pageInfo.getInteger("page");
|
|
|
+
|
|
|
+ JSONArray jsonArrayay = jsonData.getJSONArray("list");
|
|
|
+ if(jsonArrayay.size() == 0){
|
|
|
+ log.info("accountId:" + accountId + ";没有数据。总页数为:" + totalPage + "当前页数为:" + currentPage);
|
|
|
+ //returnCode = 1;
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
|
|
|
- List<BytedanceReportMaterialDaily> bytedanceReportMaterialDailyList = new ArrayList<>();
|
|
|
- for (int i = 0; i < jsonArrayay.size(); i++) {
|
|
|
- BytedanceReportMaterialDaily daily = new BytedanceReportMaterialDaily();
|
|
|
- daily.setAccountId(accountId);
|
|
|
- JSONObject detailJson = jsonArrayay.getJSONObject(i);
|
|
|
- if (!Check.isNull(detailJson)) {
|
|
|
- JSONObject dimensions = detailJson.getJSONObject("dimensions");
|
|
|
- daily.setImageMode(dimensions.getString("image_mode"));
|
|
|
- daily.setMaterialId(dimensions.getLong("material_id"));
|
|
|
- daily.setInventory(dimensions.getString("inventory"));
|
|
|
- daily.setStatDatetime(dimensions.getDate("stat_datetime")==null?null:DateUtils.formatDate(dimensions.getDate("stat_datetime"),"yyyy-MM-dd"));
|
|
|
-
|
|
|
- JSONObject metrics = detailJson.getJSONObject("metrics");
|
|
|
- daily.setActivePayAmount(metrics.getInteger("active_pay_amount"));
|
|
|
- daily.setValidPlayCost(metrics.getBigDecimal("valid_play_cost"));
|
|
|
- daily.setPlay75FeedBreak(metrics.getInteger("play_75_feed_break"));
|
|
|
- daily.setNextDayOpen(metrics.getInteger("next_day_open"));
|
|
|
- daily.setAdvancedCreativeCouponAddition(metrics.getInteger("advanced_creative_coupon_addition"));
|
|
|
- daily.setConvertMaterial(metrics.getInteger("convert"));
|
|
|
- daily.setActivePayCost(metrics.getBigDecimal("active_pay_cost"));
|
|
|
- daily.setInAppCart(metrics.getInteger("in_app_cart"));
|
|
|
- daily.setPlay25FeedBreak(metrics.getInteger("play_25_feed_break"));
|
|
|
- daily.setConsultEffective(metrics.getInteger("consult_effective"));
|
|
|
- daily.setViewMaterial(metrics.getInteger("view"));
|
|
|
- daily.setDownload(metrics.getInteger("download"));
|
|
|
- daily.setCpa(metrics.getBigDecimal("cpa"));
|
|
|
- daily.setCpc(metrics.getBigDecimal("cpc"));
|
|
|
- daily.setLocationClick(metrics.getInteger("location_click"));
|
|
|
- daily.setPhoneConfirm(metrics.getInteger("phone_confirm"));
|
|
|
- daily.setIesMusicClick(metrics.getInteger("ies_music_click"));
|
|
|
- daily.setPlayOverRate(metrics.getBigDecimal("play_over_rate"));
|
|
|
- daily.setWifiPlay(metrics.getInteger("wifi_play"));
|
|
|
- daily.setShopping(metrics.getInteger("shopping"));
|
|
|
- daily.setQq(metrics.getInteger("qq"));
|
|
|
- daily.setCtr(metrics.getBigDecimal("ctr"));
|
|
|
- daily.setCpm(metrics.getBigDecimal("cpm"));
|
|
|
- daily.setWifiPlayRate(metrics.getBigDecimal("wifi_play_rate"));
|
|
|
- daily.setLikeMaterial(metrics.getInteger("like"));
|
|
|
- daily.setPlay50FeedBreak(metrics.getInteger("play_50_feed_break"));
|
|
|
- daily.setActivePayRate(metrics.getBigDecimal("active_pay_rate"));
|
|
|
- daily.setActiveCost(metrics.getBigDecimal("active_cost"));
|
|
|
- daily.setActive(metrics.getInteger("active"));
|
|
|
- daily.setGameAddictionCost(metrics.getBigDecimal("game_addiction_cost"));
|
|
|
- daily.setGameAddiction(metrics.getInteger("game_addiction"));
|
|
|
- daily.setActiveRate(metrics.getBigDecimal("active_rate"));
|
|
|
- daily.setClick(metrics.getInteger("click"));
|
|
|
- daily.setPlayDuration_10s(metrics.getInteger("play_duration_10s"));
|
|
|
- daily.setAdvancedCreativePhoneClick(metrics.getInteger("advanced_creative_phone_click"));
|
|
|
- daily.setDownloadStart(metrics.getInteger("download_start"));
|
|
|
- daily.setHomeVisited(metrics.getInteger("home_visited"));
|
|
|
- daily.setPhone(metrics.getInteger("phone"));
|
|
|
- daily.setPhoneEffective(metrics.getInteger("phone_effective"));
|
|
|
- daily.setInAppPay(metrics.getInteger("in_app_pay"));
|
|
|
- daily.setGameAddictionRate(metrics.getBigDecimal("game_addiction_rate"));
|
|
|
- daily.setNextDayOpenCost(metrics.getBigDecimal("next_day_open_cost"));
|
|
|
- daily.setIesChallengeClick(metrics.getInteger("ies_challenge_click"));
|
|
|
- daily.setTotalPlay(metrics.getInteger("total_play"));
|
|
|
- daily.setActiveRegisterRate(metrics.getBigDecimal("active_register_rate"));
|
|
|
- daily.setAverageVideoPlay(metrics.getBigDecimal("average_video_play"));
|
|
|
- daily.setDownloadFinishCost(metrics.getBigDecimal("download_finish_cost"));
|
|
|
- daily.setPlayDuration_3s(metrics.getInteger("play_duration_3s"));
|
|
|
- daily.setActiveRegisterCost(metrics.getBigDecimal("active_register_cost"));
|
|
|
- daily.setShowMaterial(metrics.getInteger("show"));
|
|
|
- daily.setNextDayOpenRate(metrics.getBigDecimal("next_day_open_rate"));
|
|
|
- daily.setMapSearch(metrics.getInteger("map_search"));
|
|
|
- daily.setButton(metrics.getInteger("button"));
|
|
|
- daily.setPlayDurationSum(metrics.getInteger("play_duration_sum"));
|
|
|
- daily.setPlay100FeedBreak(metrics.getInteger("play_100_feed_break"));
|
|
|
- daily.setAdvancedCreativeCounselClick(metrics.getInteger("advanced_creative_counsel_click"));
|
|
|
- daily.setConvertRate(metrics.getBigDecimal("convert_rate"));
|
|
|
- daily.setDownloadFinishRate(metrics.getBigDecimal("download_finish_rate"));
|
|
|
- daily.setConsult(metrics.getInteger("consult"));
|
|
|
- daily.setShareMaterial(metrics.getInteger("share"));
|
|
|
- daily.setVote(metrics.getInteger("vote"));
|
|
|
- daily.setValidPlay(metrics.getInteger("valid_play"));
|
|
|
- daily.setInstallFinishRate(metrics.getBigDecimal("install_finish_rate"));
|
|
|
- daily.setRedirect(metrics.getInteger("redirect"));
|
|
|
- daily.setPayCount(metrics.getInteger("pay_count"));
|
|
|
- daily.setAdvancedCreativeFormClick(metrics.getInteger("advanced_creative_form_click"));
|
|
|
- daily.setCost(metrics.getBigDecimal("cost"));
|
|
|
- daily.setPhoneConnect(metrics.getInteger("phone_connect"));
|
|
|
- daily.setCoupon(metrics.getInteger("coupon"));
|
|
|
- daily.setDownloadStartRate(metrics.getBigDecimal("download_start_rate"));
|
|
|
- daily.setDownloadFinish(metrics.getInteger("download_finish"));
|
|
|
- daily.setWechat(metrics.getInteger("wechat"));
|
|
|
- daily.setCouponSinglePage(metrics.getInteger("coupon_single_page"));
|
|
|
- daily.setInstallFinish(metrics.getInteger("install_finish"));
|
|
|
- daily.setLottery(metrics.getInteger("lottery"));
|
|
|
- daily.setPlayOver(metrics.getInteger("play_over"));
|
|
|
- daily.setInAppOrder(metrics.getInteger("in_app_order"));
|
|
|
- daily.setDownloadStartCost(metrics.getBigDecimal("download_start_cost"));
|
|
|
- daily.setFollow(metrics.getInteger("follow"));
|
|
|
- daily.setMessage(metrics.getInteger("message"));
|
|
|
- daily.setInAppDetailUv(metrics.getInteger("in_app_detail_uv"));
|
|
|
- daily.setPlayDuration(metrics.getInteger("play_duration"));
|
|
|
- daily.setForm(metrics.getInteger("form"));
|
|
|
- daily.setValidPlayRate(metrics.getBigDecimal("valid_play_rate"));
|
|
|
- daily.setAveragePlayTimePerPlay(metrics.getBigDecimal("average_play_time_per_play"));
|
|
|
- daily.setConvertShowRate(metrics.getBigDecimal("convert_show_rate"));
|
|
|
- daily.setInstallFinishCost(metrics.getBigDecimal("install_finish_cost"));
|
|
|
- daily.setCommentMaterial(metrics.getInteger("comment"));
|
|
|
- daily.setInAppUv(metrics.getInteger("in_app_uv"));
|
|
|
- daily.setRegister(metrics.getInteger("register"));
|
|
|
- daily.setConvertCost(metrics.getBigDecimal("convert_cost"));
|
|
|
-
|
|
|
- bytedanceReportMaterialDailyList.add(daily);
|
|
|
- //bytedanceReportMaterialDailyMapper.insert(daily);
|
|
|
+ List<BytedanceReportMaterialDaily> bytedanceReportMaterialDailyList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < jsonArrayay.size(); i++) {
|
|
|
+ BytedanceReportMaterialDaily daily = new BytedanceReportMaterialDaily();
|
|
|
+ daily.setAccountId(accountId);
|
|
|
+ JSONObject detailJson = jsonArrayay.getJSONObject(i);
|
|
|
+ if (!Check.isNull(detailJson)) {
|
|
|
+ JSONObject dimensions = detailJson.getJSONObject("dimensions");
|
|
|
+ daily.setImageMode(dimensions.getString("image_mode"));
|
|
|
+ daily.setMaterialId(dimensions.getLong("material_id"));
|
|
|
+ daily.setInventory(dimensions.getString("inventory"));
|
|
|
+ daily.setStatDatetime(dimensions.getDate("stat_datetime")==null?null:DateUtils.formatDate(dimensions.getDate("stat_datetime"),"yyyy-MM-dd"));
|
|
|
+
|
|
|
+ JSONObject metrics = detailJson.getJSONObject("metrics");
|
|
|
+ daily.setActivePayAmount(metrics.getInteger("active_pay_amount"));
|
|
|
+ daily.setValidPlayCost(metrics.getBigDecimal("valid_play_cost"));
|
|
|
+ daily.setPlay75FeedBreak(metrics.getInteger("play_75_feed_break"));
|
|
|
+ daily.setNextDayOpen(metrics.getInteger("next_day_open"));
|
|
|
+ daily.setAdvancedCreativeCouponAddition(metrics.getInteger("advanced_creative_coupon_addition"));
|
|
|
+ daily.setConvertMaterial(metrics.getInteger("convert"));
|
|
|
+ daily.setActivePayCost(metrics.getBigDecimal("active_pay_cost"));
|
|
|
+ daily.setInAppCart(metrics.getInteger("in_app_cart"));
|
|
|
+ daily.setPlay25FeedBreak(metrics.getInteger("play_25_feed_break"));
|
|
|
+ daily.setConsultEffective(metrics.getInteger("consult_effective"));
|
|
|
+ daily.setViewMaterial(metrics.getInteger("view"));
|
|
|
+ daily.setDownload(metrics.getInteger("download"));
|
|
|
+ daily.setCpa(metrics.getBigDecimal("cpa"));
|
|
|
+ daily.setCpc(metrics.getBigDecimal("cpc"));
|
|
|
+ daily.setLocationClick(metrics.getInteger("location_click"));
|
|
|
+ daily.setPhoneConfirm(metrics.getInteger("phone_confirm"));
|
|
|
+ daily.setIesMusicClick(metrics.getInteger("ies_music_click"));
|
|
|
+ daily.setPlayOverRate(metrics.getBigDecimal("play_over_rate"));
|
|
|
+ daily.setWifiPlay(metrics.getInteger("wifi_play"));
|
|
|
+ daily.setShopping(metrics.getInteger("shopping"));
|
|
|
+ daily.setQq(metrics.getInteger("qq"));
|
|
|
+ daily.setCtr(metrics.getBigDecimal("ctr"));
|
|
|
+ daily.setCpm(metrics.getBigDecimal("cpm"));
|
|
|
+ daily.setWifiPlayRate(metrics.getBigDecimal("wifi_play_rate"));
|
|
|
+ daily.setLikeMaterial(metrics.getInteger("like"));
|
|
|
+ daily.setPlay50FeedBreak(metrics.getInteger("play_50_feed_break"));
|
|
|
+ daily.setActivePayRate(metrics.getBigDecimal("active_pay_rate"));
|
|
|
+ daily.setActiveCost(metrics.getBigDecimal("active_cost"));
|
|
|
+ daily.setActive(metrics.getInteger("active"));
|
|
|
+ daily.setGameAddictionCost(metrics.getBigDecimal("game_addiction_cost"));
|
|
|
+ daily.setGameAddiction(metrics.getInteger("game_addiction"));
|
|
|
+ daily.setActiveRate(metrics.getBigDecimal("active_rate"));
|
|
|
+ daily.setClick(metrics.getInteger("click"));
|
|
|
+ daily.setPlayDuration_10s(metrics.getInteger("play_duration_10s"));
|
|
|
+ daily.setAdvancedCreativePhoneClick(metrics.getInteger("advanced_creative_phone_click"));
|
|
|
+ daily.setDownloadStart(metrics.getInteger("download_start"));
|
|
|
+ daily.setHomeVisited(metrics.getInteger("home_visited"));
|
|
|
+ daily.setPhone(metrics.getInteger("phone"));
|
|
|
+ daily.setPhoneEffective(metrics.getInteger("phone_effective"));
|
|
|
+ daily.setInAppPay(metrics.getInteger("in_app_pay"));
|
|
|
+ daily.setGameAddictionRate(metrics.getBigDecimal("game_addiction_rate"));
|
|
|
+ daily.setNextDayOpenCost(metrics.getBigDecimal("next_day_open_cost"));
|
|
|
+ daily.setIesChallengeClick(metrics.getInteger("ies_challenge_click"));
|
|
|
+ daily.setTotalPlay(metrics.getInteger("total_play"));
|
|
|
+ daily.setActiveRegisterRate(metrics.getBigDecimal("active_register_rate"));
|
|
|
+ daily.setAverageVideoPlay(metrics.getBigDecimal("average_video_play"));
|
|
|
+ daily.setDownloadFinishCost(metrics.getBigDecimal("download_finish_cost"));
|
|
|
+ daily.setPlayDuration_3s(metrics.getInteger("play_duration_3s"));
|
|
|
+ daily.setActiveRegisterCost(metrics.getBigDecimal("active_register_cost"));
|
|
|
+ daily.setShowMaterial(metrics.getInteger("show"));
|
|
|
+ daily.setNextDayOpenRate(metrics.getBigDecimal("next_day_open_rate"));
|
|
|
+ daily.setMapSearch(metrics.getInteger("map_search"));
|
|
|
+ daily.setButton(metrics.getInteger("button"));
|
|
|
+ daily.setPlayDurationSum(metrics.getInteger("play_duration_sum"));
|
|
|
+ daily.setPlay100FeedBreak(metrics.getInteger("play_100_feed_break"));
|
|
|
+ daily.setAdvancedCreativeCounselClick(metrics.getInteger("advanced_creative_counsel_click"));
|
|
|
+ daily.setConvertRate(metrics.getBigDecimal("convert_rate"));
|
|
|
+ daily.setDownloadFinishRate(metrics.getBigDecimal("download_finish_rate"));
|
|
|
+ daily.setConsult(metrics.getInteger("consult"));
|
|
|
+ daily.setShareMaterial(metrics.getInteger("share"));
|
|
|
+ daily.setVote(metrics.getInteger("vote"));
|
|
|
+ daily.setValidPlay(metrics.getInteger("valid_play"));
|
|
|
+ daily.setInstallFinishRate(metrics.getBigDecimal("install_finish_rate"));
|
|
|
+ daily.setRedirect(metrics.getInteger("redirect"));
|
|
|
+ daily.setPayCount(metrics.getInteger("pay_count"));
|
|
|
+ daily.setAdvancedCreativeFormClick(metrics.getInteger("advanced_creative_form_click"));
|
|
|
+ daily.setCost(metrics.getBigDecimal("cost"));
|
|
|
+ daily.setPhoneConnect(metrics.getInteger("phone_connect"));
|
|
|
+ daily.setCoupon(metrics.getInteger("coupon"));
|
|
|
+ daily.setDownloadStartRate(metrics.getBigDecimal("download_start_rate"));
|
|
|
+ daily.setDownloadFinish(metrics.getInteger("download_finish"));
|
|
|
+ daily.setWechat(metrics.getInteger("wechat"));
|
|
|
+ daily.setCouponSinglePage(metrics.getInteger("coupon_single_page"));
|
|
|
+ daily.setInstallFinish(metrics.getInteger("install_finish"));
|
|
|
+ daily.setLottery(metrics.getInteger("lottery"));
|
|
|
+ daily.setPlayOver(metrics.getInteger("play_over"));
|
|
|
+ daily.setInAppOrder(metrics.getInteger("in_app_order"));
|
|
|
+ daily.setDownloadStartCost(metrics.getBigDecimal("download_start_cost"));
|
|
|
+ daily.setFollow(metrics.getInteger("follow"));
|
|
|
+ daily.setMessage(metrics.getInteger("message"));
|
|
|
+ daily.setInAppDetailUv(metrics.getInteger("in_app_detail_uv"));
|
|
|
+ daily.setPlayDuration(metrics.getInteger("play_duration"));
|
|
|
+ daily.setForm(metrics.getInteger("form"));
|
|
|
+ daily.setValidPlayRate(metrics.getBigDecimal("valid_play_rate"));
|
|
|
+ daily.setAveragePlayTimePerPlay(metrics.getBigDecimal("average_play_time_per_play"));
|
|
|
+ daily.setConvertShowRate(metrics.getBigDecimal("convert_show_rate"));
|
|
|
+ daily.setInstallFinishCost(metrics.getBigDecimal("install_finish_cost"));
|
|
|
+ daily.setCommentMaterial(metrics.getInteger("comment"));
|
|
|
+ daily.setInAppUv(metrics.getInteger("in_app_uv"));
|
|
|
+ daily.setRegister(metrics.getInteger("register"));
|
|
|
+ daily.setConvertCost(metrics.getBigDecimal("convert_cost"));
|
|
|
+
|
|
|
+ bytedanceReportMaterialDailyList.add(daily);
|
|
|
+ //bytedanceReportMaterialDailyMapper.insert(daily);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //Long insertStartTime = System.currentTimeMillis();
|
|
|
+ bytedanceReportMaterialDailyMapper.replaceIntoBatch(bytedanceReportMaterialDailyList);
|
|
|
+ //Long insertEndTime = System.currentTimeMillis();
|
|
|
+ //log.info("头条获取素材报表插入数据结束,执行耗时:{}秒", (insertEndTime - insertStartTime) / 1000);
|
|
|
+ if(currentPage >= totalPage){
|
|
|
+ //log.info("accountId:" + accountId + "数据同步完成,开始时间:" + startDate + ",结束时间:"+ endDate);
|
|
|
+ //returnCode = 1;
|
|
|
+ return 1;
|
|
|
+ }else{
|
|
|
+ bytedanceMaterialReportByPage(page + 1, pageSize, token, accountId, startDate, endDate);
|
|
|
}
|
|
|
- }
|
|
|
- //Long insertStartTime = System.currentTimeMillis();
|
|
|
- bytedanceReportMaterialDailyMapper.replaceIntoBatch(bytedanceReportMaterialDailyList);
|
|
|
- //Long insertEndTime = System.currentTimeMillis();
|
|
|
- //log.info("头条获取素材报表插入数据结束,执行耗时:{}秒", (insertEndTime - insertStartTime) / 1000);
|
|
|
- if(currentPage >= totalPage){
|
|
|
- log.info("accountId:" + accountId + "数据同步完成,开始时间:" + startDate + ",结束时间:"+ endDate);
|
|
|
- //returnCode = 1;
|
|
|
- return 1;
|
|
|
}else{
|
|
|
- bytedanceMaterialReportByPage(page + 1, pageSize, token, accountId, startDate, endDate);
|
|
|
+ //returnCode = -1;
|
|
|
+ log.error("服务器返回为空,json:"+JSONObject.toJSONString(data));
|
|
|
+ return -1;
|
|
|
}
|
|
|
- }else{
|
|
|
- //returnCode = -1;
|
|
|
- log.error("服务器返回为空,json:"+JSONObject.toJSONString(data));
|
|
|
- return -1;
|
|
|
- }
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
returnCode = -3;
|