Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into develop

dev_cs
杨树明 5 years ago
commit 5c1111f56d

@ -368,7 +368,7 @@ class SubjectsController < ApplicationController
@schools.map do |s|
school_courses = Course.where(id: course_ids, school_id: s.id)
course_count = school_courses.count
student_count = StudentsForCourse.where(course_id: school_courses.pluck(:id)).count
student_count = CourseMember.where(course_id: school_courses.pluck(:id), role: 4).count
homework_count = HomeworkCommon.find_by_sql("select count(*) cnt from homework_commons hc join courses c on hc.course_id = c.id
where c.school_id = #{s.id} and hc.id in(#{homework_common_id})").first.try(:cnt)
s.attributes.dup.merge({name: s.name, course_count: course_count, student_count: student_count,homework_count: homework_count})

@ -40,8 +40,8 @@ class Users::ApplyProfessionalAuthService < ApplicationService
# sms_cache = Rails.cache.read("apply_pro_certification")
# if sms_cache.nil?
# sms_notify_admin
Rails.cache.write("apply_pro_certification", 1)
sms_notify_admin
# Rails.cache.write("apply_pro_certification", 1)
# end
end
end

Loading…
Cancel
Save