|
|
@ -78,8 +78,6 @@ class Challenge < ApplicationRecord
|
|
|
|
# todo: 以前没加索引导致相同关卡,同一用户有多个games
|
|
|
|
# todo: 以前没加索引导致相同关卡,同一用户有多个games
|
|
|
|
# 允许跳关则直接开启
|
|
|
|
# 允许跳关则直接开启
|
|
|
|
game = games.where(user_id: user_id).take
|
|
|
|
game = games.where(user_id: user_id).take
|
|
|
|
logger.info("########---game_status: #{game.status}")
|
|
|
|
|
|
|
|
logger.info("########---challenge_id: #{id}")
|
|
|
|
|
|
|
|
if game.blank?
|
|
|
|
if game.blank?
|
|
|
|
position == 1 ? 1 : 0
|
|
|
|
position == 1 ? 1 : 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|