fixed 日统计时间开始时间
This commit is contained in:
parent
9de04dba7e
commit
6cf51901d8
|
@ -12,7 +12,7 @@ class DailyPlatformStatisticsJob < ApplicationJob
|
||||||
ActiveJob::Base.logger.info "job baidu_tongji_auth access_token ===== #{access_token}"
|
ActiveJob::Base.logger.info "job baidu_tongji_auth access_token ===== #{access_token}"
|
||||||
# 从最后一个记录日期开始,如果遗漏日期数据可以补充数据
|
# 从最后一个记录日期开始,如果遗漏日期数据可以补充数据
|
||||||
last_date = DailyPlatformStatistic.order(:date).last
|
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
|
end_date = Time.now
|
||||||
if access_token.present?
|
if access_token.present?
|
||||||
tongji_service.overview_batch_add(start_date, end_date)
|
tongji_service.overview_batch_add(start_date, end_date)
|
||||||
|
|
Loading…
Reference in New Issue