瀏覽代碼

修改定时任务

zhouzeyu@c-top.com.cn 4 年之前
父節點
當前提交
9d8baca3d6

+ 4 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceFileGetLoadJob.java

@@ -48,6 +48,7 @@ public class BytedanceFileGetLoadJob {
         }
         String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
         String yesterda = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        String yesterda2 = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
         String token = tokenService.getByAccountId(Long.valueOf(param));
         if (Check.isNull(token)) {
             log.error("此账户未获取到相关token,accountId:{}", param);
@@ -57,6 +58,7 @@ public class BytedanceFileGetLoadJob {
         oauthToken.setAccessToken(token);
         oauthToken.setAccountId(Long.parseLong(param));
         fileImageService.getFileImageData(oauthToken, yesterda, yesterda, 1, 100);
+        fileImageService.getFileImageData(oauthToken, yesterda2, yesterda2, 1, 100);
     }
 
 
@@ -75,6 +77,7 @@ public class BytedanceFileGetLoadJob {
         String token = tokenService.getByAccountId(Long.valueOf(param));
         String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
         String yesterda = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        String yesterda2 = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
         if (Check.isNull(token)) {
             log.error("此账户未获取到相关token,accountId:{}", param);
             return;
@@ -83,6 +86,7 @@ public class BytedanceFileGetLoadJob {
         oauthToken.setAccessToken(token);
         oauthToken.setAccountId(Long.parseLong(param));
         fileVideoService.getFileVideoData(oauthToken, yesterda, yesterda, 1, 100);
+        fileVideoService.getFileVideoData(oauthToken, yesterda2, yesterda2, 1, 100);
     }