From c9a38078e44ad575eeccda52339c58fcd29fb4f3 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 4 Jun 2019 15:48:40 +0800 Subject: [PATCH] fix management school summary info bug --- .../management/school_data_grow_service.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/services/management/school_data_grow_service.rb b/app/services/management/school_data_grow_service.rb index f867ab45..470a3367 100644 --- a/app/services/management/school_data_grow_service.rb +++ b/app/services/management/school_data_grow_service.rb @@ -46,14 +46,14 @@ class Management::SchoolDataGrowService .joins('LEFT JOIN school_daily_active_users au ON au.school_daily_report_id = sdr.id') reports = search_filter(reports) reports.select( - 'SUM(distinct teacher_increase_count) teacher_increase_count,'\ - 'SUM(distinct student_increase_count) student_increase_count,'\ - 'SUM(distinct course_increase_count) course_increase_count,'\ - 'SUM(distinct shixun_increase_count) shixun_increase_count,'\ - 'SUM(distinct shixun_homework_count) shixun_homework_count,'\ - 'SUM(distinct shixun_evaluate_count) shixun_evaluate_count,'\ + 'SUM(teacher_increase_count) teacher_increase_count,'\ + 'SUM(student_increase_count) student_increase_count,'\ + 'SUM(course_increase_count) course_increase_count,'\ + 'SUM(shixun_increase_count) shixun_increase_count,'\ + 'SUM(shixun_homework_count) shixun_homework_count,'\ + 'SUM(shixun_evaluate_count) shixun_evaluate_count,'\ 'COUNT(distinct au.user_id) uniq_active_user_count,'\ - 'SUM(distinct active_user_count) active_user_count' + 'SUM(active_user_count) active_user_count' ).first end end