Browse Source

fixed 日统计时间开始时间

pull/347/head
xxq250 2 years ago
parent
commit
6cf51901d8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/jobs/daily_platform_statistics_job.rb

+ 1
- 1
app/jobs/daily_platform_statistics_job.rb 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)


Loading…
Cancel
Save