Merge branch 'dev_chen' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_chen

dev_chen
cxt 5 years ago
commit d3a0154423

@ -22,7 +22,6 @@ class Admins::SchoolBaseStatisticService < ApplicationService
count = schools.count.count count = schools.count.count
# 根据排序字段进行查询 # 根据排序字段进行查询
schools = query_by_sort_column(schools, params[:sort_by]) schools = query_by_sort_column(schools, params[:sort_by])
schools.reorder("#{ params[:sort_by] != 0} desc")
schools = custom_sort(schools, params[:sort_by], params[:sort_direction]) schools = custom_sort(schools, params[:sort_by], params[:sort_direction])
schools = schools.limit(page_size).offset(offset) schools = schools.limit(page_size).offset(offset)

Loading…
Cancel
Save