|
@@ -10,7 +10,6 @@ import org.jeecg.common.util.DateUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
@@ -27,14 +26,14 @@ public class KuaishouMaterialsLoadJob {
|
|
|
@XxlJob("kuaishouMaterials")
|
|
|
public ReturnT<String> execute(String param) throws Exception {
|
|
|
//增加接口的开始和结束日期
|
|
|
- Date startDate = DateUtils.addDay(new Date(), -1);
|
|
|
- Date endDate = new Date();
|
|
|
+ String endDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", endDate, -1);
|
|
|
//1:查询当日数据
|
|
|
List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
|
|
|
executorService = Executors.newFixedThreadPool(8);
|
|
|
tokens.forEach(token -> executorService.submit(() -> {
|
|
|
//获取全量视频素材数据
|
|
|
- kuaishouInterfaceService.getVideoList(token, DateUtils.getNowDate("yyyy-MM-dd"));
|
|
|
+ kuaishouInterfaceService.getVideoList(token, startDate, endDate);
|
|
|
// 获取图片信息数据
|
|
|
kuaishouInterfaceService.getImageList(token, DateUtils.getNowDate("yyyy-MM-dd"));
|
|
|
}));
|