Browse Source

fixed 后台统计优化,7天时间精确

pull/313/head
xiaoxiaoqiong 3 years ago
parent
commit
52bd568789
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      app/controllers/admins/dashboards_controller.rb

+ 3
- 3
app/controllers/admins/dashboards_controller.rb View File

@@ -65,14 +65,14 @@ class Admins::DashboardsController < Admins::BaseController
end

def current_week
7.days.ago.beginning_of_day..Time.now.end_of_day
7.days.ago.end_of_day..Time.now.end_of_day
end

def current_month
30.days.ago.beginning_of_day..Time.now.end_of_day
30.days.ago.end_of_day..Time.now.end_of_day
end

def pre_week
14.days.ago.beginning_of_day..7.days.ago.beginning_of_day
14.days.ago.end_of_day..7.days.ago.end_of_day
end
end

Loading…
Cancel
Save