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
542 B
18 lines
542 B
5 years ago
|
class Admins::UserSchoolsStatisticsController < Admins::BaseController
|
||
|
|
||
|
def export
|
||
|
params[:per_page] = 10000
|
||
|
_count, @users = 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('finish_challenge_count', 'desc')
|
||
|
total_count, schools = Admins::UserSchoolsStatisticQuery.call(params)
|
||
|
|
||
|
@schools = paginate schools, total_count: total_count
|
||
|
|
||
|
end
|
||
|
end
|