|
@@ -9,7 +9,6 @@ import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -68,10 +67,15 @@ public class BytedanceCreativeReportDailyServiceImpl implements IBytedanceCreati
|
|
|
BytedanceCreativeReportDaily report = JSONObject.parseObject(dataObject.toJSONString(), BytedanceCreativeReportDaily.class);
|
|
|
|
|
|
report.setAdvertiserId(oauthToken.getAccountId());
|
|
|
- report.setStatDatetime(yesterda.replace("-", ""));
|
|
|
+ report.setStatDatetime(report.getStatDatetime() == null ? null : report.getStatDatetime().substring(0, 10).replace("-", ""));
|
|
|
list.add(report);
|
|
|
}
|
|
|
- bytedanceCreativeReportDailyMapper.insert(list);
|
|
|
+ try {
|
|
|
+ bytedanceCreativeReportDailyMapper.insert(list);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info(e.toString());
|
|
|
+ }
|
|
|
+
|
|
|
pageNumber++;
|
|
|
int totalPage = resultObject.getJSONObject("data").getJSONObject("page_info").getInteger("total_page");
|
|
|
if (pageNumber <= totalPage) {
|