|
@@ -32,7 +32,7 @@ public class BytedanceCreativeGetServiceImpl implements IBytedanceCreativeGetSer
|
|
|
BytedanceCreativeGetMapper bytedanceCreativeGetMapper;
|
|
|
|
|
|
@Override
|
|
|
- public void getCreativeData(OauthToken oauthToken, int page, int pageSize) {
|
|
|
+ public void getCreativeData(OauthToken oauthToken, String startDate, String endDate, int page, int pageSize) {
|
|
|
log.info("开始获取创意数据 accountID:{},page:{}", oauthToken.getAccountId(), page);
|
|
|
// 请求地址
|
|
|
String url = bytedanceApiUrl + BytedanceConstant.BYTEDANCE_V2_CREATIVE_GET;
|
|
@@ -40,6 +40,10 @@ public class BytedanceCreativeGetServiceImpl implements IBytedanceCreativeGetSer
|
|
|
param.put("advertiser_id", oauthToken.getAccountId());
|
|
|
param.put("page", page);
|
|
|
param.put("page_size", pageSize);
|
|
|
+ JSONObject param2 = new JSONObject();
|
|
|
+ param2.put("creative_modify_time", startDate);
|
|
|
+ param.put("filtering", param2);
|
|
|
+
|
|
|
JSONObject resultObject = HttpUtils.bytedanceGetRequest(oauthToken.getAccessToken(), url, param);
|
|
|
|
|
|
Integer code = resultObject.getInteger("code");
|
|
@@ -61,7 +65,7 @@ public class BytedanceCreativeGetServiceImpl implements IBytedanceCreativeGetSer
|
|
|
page++;
|
|
|
int totalPage = resultObject.getJSONObject("data").getJSONObject("page_info").getInteger("total_page");
|
|
|
if (page <= totalPage) {
|
|
|
- getCreativeData(oauthToken, page, 1000);
|
|
|
+ getCreativeData(oauthToken, startDate, endDate, page, 1000);
|
|
|
}
|
|
|
|
|
|
}
|