|
@@ -87,7 +87,7 @@ public class BytedanceFileVideoGetServiceImpl implements IBytedanceFileVideoGetS
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
- * @description: 根据账户获取视频素材-账户下全部视频素材
|
|
|
+ * @description: 根据账户获取视频素材-账户/素材id 下全部视频素材
|
|
|
*
|
|
|
* @param oauthToken
|
|
|
* @param page
|
|
@@ -97,7 +97,7 @@ public class BytedanceFileVideoGetServiceImpl implements IBytedanceFileVideoGetS
|
|
|
* @time: 2022/2/9
|
|
|
*/
|
|
|
@Override
|
|
|
- public Map<String,String> getBytedanceVideoByAccountId(OauthToken oauthToken,int page, int pageSize) {
|
|
|
+ public Map<String,String> getBytedanceVideoByAccountId(OauthToken oauthToken,List<Long> materialIds,int page, int pageSize) {
|
|
|
Map<String,String> resultMap = new HashMap<>();
|
|
|
log.info("调用接口------getBytedanceVideoByAccountId----根据账户获取视频素材---账户--{}===第{}页===》》》",oauthToken.getAccountId(),page);
|
|
|
// 请求地址
|
|
@@ -106,16 +106,20 @@ public class BytedanceFileVideoGetServiceImpl implements IBytedanceFileVideoGetS
|
|
|
param.put("advertiser_id", oauthToken.getAccountId());
|
|
|
param.put("page", page);
|
|
|
param.put("page_size", pageSize);
|
|
|
- /*
|
|
|
+
|
|
|
JSONObject param2 = new JSONObject();
|
|
|
- if (!Check.isNull(startDate)){
|
|
|
+ if (!Check.isNull(materialIds)){
|
|
|
+ param2.put("material_ids",materialIds);
|
|
|
+ }
|
|
|
+ /* if (!Check.isNull(startDate)){
|
|
|
param2.put("start_time",startDate);
|
|
|
}
|
|
|
if (!Check.isNull(endDate)){
|
|
|
param2.put("end_time",endDate);
|
|
|
}
|
|
|
- param.put("filtering",param2);
|
|
|
*/
|
|
|
+ param.put("filtering",param2);
|
|
|
+
|
|
|
JSONObject resultObject = HttpUtils.bytedanceGetRequest(oauthToken.getAccessToken(), url, param);
|
|
|
Integer code = resultObject.getInteger("code");
|
|
|
if (null == code || !code.equals(0)) {
|
|
@@ -149,7 +153,7 @@ public class BytedanceFileVideoGetServiceImpl implements IBytedanceFileVideoGetS
|
|
|
page++;
|
|
|
int totalPage = resultObject.getJSONObject("data").getJSONObject("page_info").getInteger("total_page");
|
|
|
if (page <= totalPage) {
|
|
|
- getBytedanceVideoByAccountId(oauthToken,page, 100);
|
|
|
+ getBytedanceVideoByAccountId(oauthToken,materialIds,page, 100);
|
|
|
}
|
|
|
resultMap.put("code","0");
|
|
|
resultMap.put("message","success");
|