From 38eb71d7f2eeee95e5343b5e5952087ded2cd1e7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 1 Apr 2019 12:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=ADtpi=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=BA=93=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87id?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index d5e8c682..0d17ccf6 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -158,7 +158,7 @@ class ManagementsController < ApplicationController @sub_type = 8 @g = Gitlab.client if params[:search] - myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id) + myshixun_id = Game.where("identifier = #{params[:search]} or id = #{params[:search]}").pluck(:myshixun_id) @myshixuns = Myshixun.where(:id => myshixun_id).includes(:shixun) else @myshixuns = Myshixun.where("0=0").includes(:shixun)