Adjustreact
jingquan huang 5 years ago
parent c44e8bc05d
commit 91f730c97d

@ -21,7 +21,7 @@ class Weapps::SubjectQuery < ApplicationQuery
subjects = subjects.left_joins(:shixuns).select('subjects.id, subjects.name, subjects.excellent, subjects.stages_count, subjects.status, subjects.homepage_show,
subjects.shixuns_count, subjects.updated_at, IFNULL(sum(shixuns.myshixuns_count), 0) myshixuns_count')
.group('subjects.id').order("subjects.homepage_show #{sort_type}, #{order_type} #{sort_type})")
.group('subjects.id').order("subjects.homepage_show #{sort_type}, #{order_type} #{sort_type}")
subjects
end

Loading…
Cancel
Save