|
@@ -22,13 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @Description: 快手-获取视频接口
|
|
@@ -294,7 +288,7 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
|
|
|
* 素造接口,获取同步供应商素材标签数据
|
|
|
*/
|
|
|
@Override
|
|
|
- public void getSuZaoList(String token, Long accountId, int page,String startDate) {
|
|
|
+ public void getSuZaoList(String token, Long accountId, int page, String startDate) {
|
|
|
String url = "https://ad.e.kuaishou.com/rest/openapi/v1/ad_creator/video/list";
|
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
@@ -304,7 +298,7 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
|
|
|
param.put("page", page);
|
|
|
param.put("page_size", 200);
|
|
|
param.put("start_date", startDate);
|
|
|
- param.put("end_date", DateUtils.formatDate(new Date(),DateUtils.NEW_FORMAT));
|
|
|
+ param.put("end_date", DateUtils.formatDate(new Date(), DateUtils.NEW_FORMAT));
|
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
|
if (Check.isNull(resultJson)) {
|
|
@@ -340,7 +334,7 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
|
|
|
if (!Check.isNull(videoGetList)) {
|
|
|
videoGetMapper.updateBatch(videoGetList);
|
|
|
}
|
|
|
- getSuZaoList(token, accountId, page + 1,startDate);
|
|
|
+ getSuZaoList(token, accountId, page + 1, startDate);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -349,7 +343,12 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<String> queryPhotoIdsByProjectAndMd5(Long projectId, String signature,JSONArray accountId) {
|
|
|
- return videoGetMapper.queryPhotoIdsByProjectAndMd5(projectId, signature,accountId);
|
|
|
+ public List<String> queryPhotoIdsByProjectAndMd5(Long projectId, String signature, JSONArray accountId) {
|
|
|
+ return videoGetMapper.queryPhotoIdsByProjectAndMd5(projectId, signature, accountId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getVideoByPhotoIdAndAccountId(Long accountId, Long photoId) {
|
|
|
+ return videoGetMapper.getVideoByPhotoIdAndAccountId(accountId, photoId);
|
|
|
}
|
|
|
}
|