You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
523 B
18 lines
523 B
class Admins::UserSchoolsStatisticsController < Admins::BaseController
|
|
|
|
def export
|
|
params[:per_page] = 500
|
|
_count, @schools = Admins::UserSchoolsStatisticQuery.call(params)
|
|
|
|
filename = ['用户运营统计', Time.zone.now.strftime('%Y%m%d%H%M%S')].join('-') << '.xlsx'
|
|
render xlsx: 'export', filename: filename
|
|
end
|
|
|
|
def index
|
|
default_sort('cnt', 'desc')
|
|
total_count, schools = Admins::UserSchoolsStatisticQuery.call(params)
|
|
|
|
@schools = paginate schools, total_count: total_count
|
|
|
|
end
|
|
end |