fixed 日统计时间开始时间

This commit is contained in:
xxq250 2024-06-06 16:34:25 +08:00
parent 9de04dba7e
commit 6cf51901d8
1 changed files with 1 additions and 1 deletions

View File

@ -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)