From 6cf51901d8d96230ac9639fb11447b80bdce8bf7 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 6 Jun 2024 16:34:25 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E6=97=A5=E7=BB=9F=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/daily_platform_statistics_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/daily_platform_statistics_job.rb b/app/jobs/daily_platform_statistics_job.rb index 5610f304b..a65fa3c6e 100644 --- a/app/jobs/daily_platform_statistics_job.rb +++ b/app/jobs/daily_platform_statistics_job.rb @@ -12,7 +12,7 @@ class DailyPlatformStatisticsJob < ApplicationJob ActiveJob::Base.logger.info "job baidu_tongji_auth access_token ===== #{access_token}" # 从最后一个记录日期开始,如果遗漏日期数据可以补充数据 last_date = DailyPlatformStatistic.order(:date).last - start_date = last_date.date + start_date = last_date.present? ? last_date.date : 1.days.ago.beginning_of_day end_date = Time.now if access_token.present? tongji_service.overview_batch_add(start_date, end_date)