|
|
|
@ -27,7 +27,7 @@ class CollegesController < ApplicationController
|
|
|
|
|
def shixun_time
|
|
|
|
|
time_sum = Game.joins('left join user_extensions on user_extensions.user_id = games.user_id')
|
|
|
|
|
.where(user_extensions: { school_id: current_school.id }).sum(:cost_time)
|
|
|
|
|
shixun_time_sum = (time_sum / (24 * 60 * 60.0)).ceil
|
|
|
|
|
shixun_time_sum = (time_sum / 60.0).ceil
|
|
|
|
|
|
|
|
|
|
render json: { shixun_time: shixun_time_sum }
|
|
|
|
|
end
|
|
|
|
|