|
@@ -9,12 +9,15 @@ import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 图片与视频素材日报
|
|
@@ -44,6 +47,12 @@ public class BytedanceMaterialReportDailyServiceImpl implements IBytedanceMateri
|
|
|
param.put("page_size", pageSize);
|
|
|
param.put("group_by", new String[]{"STAT_GROUP_BY_MATERIAL_ID", "STAT_GROUP_BY_INVENTORY", "STAT_GROUP_BY_IMAGE_MODE", "STAT_GROUP_BY_TIME_DAY"});
|
|
|
|
|
|
+ //过滤 imageMode 为 MATERIAL_IMAGE_MODE_TITLE
|
|
|
+ Map map = new HashMap();
|
|
|
+ String image_mode[] = new String[]{"MATERIAL_IMAGE_MODE_TITLE"};
|
|
|
+ map.put("image_mode",image_mode);
|
|
|
+ param.put("filtering", map);
|
|
|
+
|
|
|
JSONObject resultObject = HttpUtils.bytedanceGetRequest(oauthToken.getAccessToken(), url, param);
|
|
|
|
|
|
Integer code = resultObject.getInteger("code");
|
|
@@ -75,6 +84,7 @@ public class BytedanceMaterialReportDailyServiceImpl implements IBytedanceMateri
|
|
|
list.add(report);
|
|
|
} catch (Exception e) {
|
|
|
log.info("错误:{}", e.toString());
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
try {
|