|
|
@ -129,7 +129,7 @@ class CnmoocsService
|
|
|
|
# shixun_ids = StageShixun.where(:stage_id => subject.stages).pluck(:shixun_id)
|
|
|
|
# shixun_ids = StageShixun.where(:stage_id => subject.stages).pluck(:shixun_id)
|
|
|
|
#myshixuns = Myshixun.where(:user_id => params[:userId], shixun_id: shixun_ids).includes(:games)
|
|
|
|
#myshixuns = Myshixun.where(:user_id => params[:userId], shixun_id: shixun_ids).includes(:games)
|
|
|
|
myshixun = shixun.myshixuns.where(:user_id => params[:userId]).includes(:games)
|
|
|
|
myshixun = shixun.myshixuns.where(:user_id => params[:userId]).includes(:games)
|
|
|
|
if myshixun
|
|
|
|
if myshixun.present?
|
|
|
|
score = myshixun.total_score
|
|
|
|
score = myshixun.total_score
|
|
|
|
time = 0
|
|
|
|
time = 0
|
|
|
|
myshixun.games.each do |game|
|
|
|
|
myshixun.games.each do |game|
|
|
|
|