diff --git a/app/models/myshixun.rb b/app/models/myshixun.rb index 7714a8f2..774caad9 100644 --- a/app/models/myshixun.rb +++ b/app/models/myshixun.rb @@ -64,7 +64,7 @@ class Myshixun < ActiveRecord::Base time = 0 self.games.each do |game| if game.status == 2 - time += (game.end_time.to_i - game.open_time.to_i) > 0 ? (game.end_time.to_i - game.open_time.to_i) : 0 + time += game.cost_time.to_i end end time diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb index 1f680aed..ee9cd765 100644 --- a/app/views/student_work/_shixun_work_show.html.erb +++ b/app/views/student_work/_shixun_work_show.html.erb @@ -55,7 +55,7 @@