|
@@ -64,12 +64,12 @@ public class AiKuaishouNewCreateCampaignServiceImpl implements IAiKuaishouNewCre
|
|
|
|
|
|
// 2.2 执行 素造的 视频拉取服务,时间过滤执行 yyyy-MM-dd HH:mm:ss
|
|
|
// 时间差,单位为分钟
|
|
|
- int timeStart = 5;
|
|
|
- int timeEnd = 10;
|
|
|
- Date now = new Date();
|
|
|
- String startTime = DateUtils.formatDate(new Date(System.currentTimeMillis() - timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
|
|
|
- String endTime = DateUtils.formatDate(new Date(System.currentTimeMillis() - timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
|
|
|
- kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, endTime,startTime);
|
|
|
+ int timeStart = -10;
|
|
|
+ int timeEnd = -5;
|
|
|
+ Long now = System.currentTimeMillis();
|
|
|
+ String startTime = DateUtils.formatDate(new Date(now + timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
|
|
|
+ String endTime = DateUtils.formatDate(new Date(now + timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
|
|
|
+ kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime,endTime);
|
|
|
|
|
|
|
|
|
// 3、获取5分钟内,ctop_kuaishou_video_get 的视频数据,记为 N,如果有数据则执行下面步骤
|
|
@@ -85,7 +85,7 @@ public class AiKuaishouNewCreateCampaignServiceImpl implements IAiKuaishouNewCre
|
|
|
JSONArray campaignList = kuaishouInterfaceService.getCampaignList(token, new Date(), new Date(),1);
|
|
|
boolean isHaveNewCampaign = false;
|
|
|
Long newCampaignId = 0L;
|
|
|
- if (campaignList.size()>0){
|
|
|
+ if (null!=campaignList&&campaignList.size()>0){
|
|
|
for(int i = 0;i<campaignList.size();i++){
|
|
|
JSONObject jsonObject = campaignList.getJSONObject(i);
|
|
|
if (jsonObject.getString("campaign_name").contains("素材上新")){
|