|
@@ -378,16 +378,6 @@ public class ReportServiceImpl implements IReportService {
|
|
|
return getObject;
|
|
|
}
|
|
|
|
|
|
- private JSONObject getAdStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
- // 请求地址
|
|
|
- String url = "https://ad.toutiao.com/open_api/2/report/ad/get/";
|
|
|
- JSONArray groupBy = new JSONArray();
|
|
|
- groupBy.add("STAT_GROUP_BY_FIELD_ID");
|
|
|
- groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
|
|
|
- conditions.put("group_by", groupBy);
|
|
|
- return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public void insertCustomerInfo(String csvPath, String charset) {
|
|
|
try {
|
|
@@ -819,15 +809,33 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public JSONObject getAgentStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
+ /**
|
|
|
+ * 获取广告创意报表信息
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param conditions
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public JSONObject getCreativeStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
// 请求地址
|
|
|
- String url = "https://ad.toutiao.com/open_api/2/report/agent/get/";
|
|
|
+ String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_creative_get");
|
|
|
+ JSONArray groupBy = new JSONArray();
|
|
|
+ groupBy.add("STAT_GROUP_BY_FIELD_ID");
|
|
|
+ groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
|
|
|
+ conditions.put("group_by", groupBy);
|
|
|
return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
|
|
|
}
|
|
|
|
|
|
- public JSONObject getCreativeStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
+ /**
|
|
|
+ * 获取广告计划报表信息
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param conditions
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private JSONObject getAdStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
// 请求地址
|
|
|
- String url = "https://ad.toutiao.com/open_api/2/report/creative/get/";
|
|
|
+ String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_report_get");
|
|
|
JSONArray groupBy = new JSONArray();
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_ID");
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
|
|
@@ -835,9 +843,16 @@ public class ReportServiceImpl implements IReportService {
|
|
|
return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取广告组报表信息
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param conditions
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public JSONObject getCampaignStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
// 请求地址
|
|
|
- String url = "https://ad.toutiao.com/open_api/2/report/campaign/get/";
|
|
|
+ String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_campaign_report_get");
|
|
|
JSONArray groupBy = new JSONArray();
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_ID");
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
|
|
@@ -854,7 +869,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
*/
|
|
|
public JSONObject getAdvertiserStat(CtopOauthToken token, JSONObject conditions) {
|
|
|
// 请求地址
|
|
|
- String url = "https://ad.toutiao.com/open_api/2/report/advertiser/get/";
|
|
|
+ String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_advertiser_report_get");
|
|
|
JSONArray groupBy = new JSONArray();
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_ID");
|
|
|
groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
|