|
@@ -320,7 +320,10 @@ public class BytedancePromoterReportServiceImpl implements IBytedancePromoterRep
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Access-Token", accessToken);
|
|
headers.put("Access-Token", accessToken);
|
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Content-Type", "application/json");
|
|
|
|
|
+ long urlStartTime = System.currentTimeMillis();
|
|
|
String s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
String s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
|
|
+ long urlEndTime = System.currentTimeMillis();
|
|
|
|
|
+ log.info("urlTime:{}", urlEndTime - urlStartTime);
|
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
|
if (Check.isNull(result)) {
|
|
if (Check.isNull(result)) {
|
|
|
log.info("账户id:{},广告日报(最细粒度)请求结果返回为空", advertiserId);
|
|
log.info("账户id:{},广告日报(最细粒度)请求结果返回为空", advertiserId);
|
|
@@ -377,9 +380,15 @@ public class BytedancePromoterReportServiceImpl implements IBytedancePromoterRep
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (!Check.isNull(promoterReportDailies)) {
|
|
if (!Check.isNull(promoterReportDailies)) {
|
|
|
|
|
+ long tidbStartTime = System.currentTimeMillis();
|
|
|
promoterReportMapper.replacePromoterReportDailies(promoterReportDailies);
|
|
promoterReportMapper.replacePromoterReportDailies(promoterReportDailies);
|
|
|
|
|
+ long tidbEndTime = System.currentTimeMillis();
|
|
|
|
|
+ log.info("tidb入库时间:{}", tidbEndTime - tidbStartTime);
|
|
|
try {
|
|
try {
|
|
|
|
|
+ long selectDbStartTime = System.currentTimeMillis();
|
|
|
promoterReportMapper.replacePromoterReportDailiesSD(promoterReportDailies);
|
|
promoterReportMapper.replacePromoterReportDailiesSD(promoterReportDailies);
|
|
|
|
|
+ long selectDbEnsTime = System.currentTimeMillis();
|
|
|
|
|
+ log.info("selectDb入库时间:{}", selectDbEnsTime - selectDbStartTime);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("", e);
|
|
log.error("", e);
|
|
|
}
|
|
}
|