From af97c4571608714472fa2bfb08132f5c4ccf8a78 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 15 May 2019 10:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E9=94=81=E6=B5=8B=E8=AF=95=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/games_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index 3dccc7f9..8b5e486d 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -318,7 +318,7 @@ class GamesService max_query_index = game.query_index - 1 # 区分评测过未评测过,未评测过按需求取数据 if max_query_index > 0 - qurey_test_sets = TestSet.find_by_sql("SELECT o.actual_output, o.out_put, o.result, o.compile_success, o.test_set_position, o.query_index,t.is_public,t.input, t.output, g.id as game_id, c.id as challenge_id FROM outputs o,games g ,challenges c,test_sets t where + qurey_test_sets = TestSet.find_by_sql("SELECT o.code, o.actual_output, o.out_put, o.result, o.compile_success, o.test_set_position, o.query_index,t.is_public,t.input, t.output, g.id as game_id, c.id as challenge_id FROM outputs o,games g ,challenges c,test_sets t where g.id=#{game.id} and o.query_index=#{max_query_index} and g.id = o.game_id and c.id= g.challenge_id and t.challenge_id = c.id and t.position =o.test_set_position order by o.query_index ") else