小时改成分钟

courseware
jingquan huang 5 years ago
parent 5885cd2ac1
commit 309a1d28dd

@ -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

Loading…
Cancel
Save