|
@@ -47,6 +47,7 @@ public class BytedanceProjectServiceImpl implements IBytedanceProjectService {
|
|
|
param.put("page_size", 100);
|
|
|
JSONObject filtering = new JSONObject();
|
|
|
filtering.put("project_modify_time", startDate);
|
|
|
+ filtering.put("project_create_time", startDate);
|
|
|
param.put("filtering", filtering);
|
|
|
JSONObject resultObject = HttpUtils.bytedanceGetRequest(oauthToken.getAccessToken(), url, param);
|
|
|
if (Check.isNull(resultObject)) {
|
|
@@ -80,5 +81,16 @@ public class BytedanceProjectServiceImpl implements IBytedanceProjectService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ public void updProjectStatus(OauthToken token, Long projectId, String disable) {
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
+ params.put("advertiser_id", token.getAccountId());
|
|
|
+ JSONObject data = new JSONObject();
|
|
|
+ data.put("project_id", projectId);
|
|
|
+ data.put("opt_status", disable);
|
|
|
+ List<JSONObject> list = new ArrayList<>();
|
|
|
+ list.add(data);
|
|
|
+ params.put("data", list);
|
|
|
+ String url = bytedanceApiUrl + "/v3.0/project/status/update/";
|
|
|
+ JSONObject object = HttpUtils.bytedancePostRequest(token.getAccessToken(), url, params);
|
|
|
+ }
|
|
|
}
|