From d2cbfd852465a73ccfafea26825f8c63c6bbb48f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 22 Jun 2020 14:49:30 +0800 Subject: [PATCH] fixbug --- app/tasks/statistic_school_daily_report_task.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/tasks/statistic_school_daily_report_task.rb b/app/tasks/statistic_school_daily_report_task.rb index b8dc955c..ad08e06e 100644 --- a/app/tasks/statistic_school_daily_report_task.rb +++ b/app/tasks/statistic_school_daily_report_task.rb @@ -7,7 +7,7 @@ class StatisticSchoolDailyReportTask teacher_count = users.where(created_on: yesterday, user_extensions: { identity: User::TEACHER }).count student_count = users.where(created_on: yesterday, user_extensions: { identity: User::STUDENT }).count - prefessional_count = users.where(created_on: yesterday, user_extensions: { identity: User::ENTERPRISE }).count + professional_count = users.where(created_on: yesterday, user_extensions: { identity: User::ENTERPRISE }).count # 活跃用户 active_user_ids = users.where(last_login_on: yesterday).pluck(:id) @@ -34,13 +34,13 @@ class StatisticSchoolDailyReportTask .where(created_at: yesterday).reorder(nil).count # 无有效数据时不记录 - data = [teacher_count, student_count, prefessional_count, course_count, shixun_count, active_user_count, + data = [teacher_count, student_count, professional_count, course_count, shixun_count, active_user_count, shixun_homework_count, shixun_evaluate_count] next if data.all?(&:zero?) create_params = { school_id: school.id, school_name: school.name, teacher_increase_count: teacher_count, - student_increase_count: student_count, prefessional_increase_count: prefessional_count, course_increase_count: course_count, + student_increase_count: student_count, professional_increase_count: professional_count, course_increase_count: course_count, shixun_homework_count: shixun_homework_count, shixun_evaluate_count: shixun_evaluate_count, shixun_increase_count: shixun_count, active_user_count: active_user_count, date: current_date }