From bdb9e7b1ad1349237f1e864799b432ea7d82a53f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 6 Mar 2020 14:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/shixuns.rake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tasks/shixuns.rake b/lib/tasks/shixuns.rake index f2cdddc52..bca3d6db6 100644 --- a/lib/tasks/shixuns.rake +++ b/lib/tasks/shixuns.rake @@ -9,7 +9,11 @@ namespace :shixuns do if ENV['myshixun_id'].present? myshixun = Myshixun.find(ENV['myshixun_id']) myshixun.games.where(status: 2).each do |game| + puts "open_time: #{game.open_time.to_i}" + puts "end_time: #{game.end_time.to_i}" + puts "game_id: #{game.id}" cost_time = game.open_time.to_i - game.end_time.to_i + puts "cost_time: #{cost_time}" game.update_column(:cost_time, cost_time) end end