|
@@ -633,10 +633,10 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public void getAgentReport(
|
|
public void getAgentReport(
|
|
- OauthToken token, String startDate, String endDate) {
|
|
|
|
|
|
+ JSONObject token, String startDate, String endDate) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
// 日报
|
|
// 日报
|
|
- jsonObject.put("agent_id", token.getAccountId());
|
|
|
|
|
|
+ jsonObject.put("agent_id", token.getLong("accountId"));
|
|
jsonObject.put("start_date", startDate);
|
|
jsonObject.put("start_date", startDate);
|
|
jsonObject.put("end_date", endDate);
|
|
jsonObject.put("end_date", endDate);
|
|
jsonObject.put("page_size", 1000);
|
|
jsonObject.put("page_size", 1000);
|
|
@@ -647,7 +647,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
|
|
/**
|
|
/**
|
|
* 获取代理商
|
|
* 获取代理商
|
|
*/
|
|
*/
|
|
- private void getAgentReportByPage(OauthToken token, JSONObject conditions, Integer page) {
|
|
|
|
|
|
+ private void getAgentReportByPage(JSONObject token, JSONObject conditions, Integer page) {
|
|
conditions.put("page", page);
|
|
conditions.put("page", page);
|
|
SerializeConfig config = new SerializeConfig();
|
|
SerializeConfig config = new SerializeConfig();
|
|
config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
|
|
config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
|
|
@@ -683,8 +683,8 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
log.info("获取代理商数据错误:{}", e.toString());
|
|
log.info("获取代理商数据错误:{}", e.toString());
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- log.error("获取代理商获取失败,结果:{}",getObject.getString("message"));
|
|
|
|
|
|
+ } else {
|
|
|
|
+ log.error("获取代理商获取失败,结果:{}", getObject.getString("message"));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
page++;
|
|
page++;
|
|
@@ -703,10 +703,10 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
|
|
* @param conditions
|
|
* @param conditions
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public JSONObject getAgentStat(OauthToken token, JSONObject conditions) {
|
|
|
|
|
|
+ public JSONObject getAgentStat(JSONObject token, JSONObject conditions) {
|
|
// 请求地址
|
|
// 请求地址
|
|
String url = bytedanceApiUrl + BytedanceConstant.BYTEDANCE_V2_REPORT_AGENT_GET_V2;
|
|
String url = bytedanceApiUrl + BytedanceConstant.BYTEDANCE_V2_REPORT_AGENT_GET_V2;
|
|
- return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
|
|
|
|
|
|
+ return HttpUtils.bytedanceGetRequest(token.getString("accessToken"), url, conditions);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|