diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index e42beca7..30c26e9d 100755 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -114,7 +114,11 @@ class ManagementsController < ApplicationController @sub_type = 8 @g = Gitlab.client if params[:search] - myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id) + if params[:search].to_i.to_s == params[:search].to_s + myshixun_id = Game.where(:myshixun_id => params[:search].to_i).pluck(:myshixun_id) + else + myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id) + end @myshixuns = Myshixun.where(:id => myshixun_id).includes(:shixun) else @myshixuns = Myshixun.where("0=0").includes(:shixun)