From e1cfd7700ac60fa3d1958a8cefe746820884acf8 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 16 Jan 2020 09:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E7=94=A8=E5=AE=9E=E8=AE=AD=E6=98=AF?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=B7=B2=E5=85=AC=E5=BC=80=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/shixun_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/shixun_search_service.rb b/app/services/shixun_search_service.rb index 323804e95..2dcf265dc 100644 --- a/app/services/shixun_search_service.rb +++ b/app/services/shixun_search_service.rb @@ -26,7 +26,7 @@ class ShixunSearchService < ApplicationService shixun_ids = ShixunSchool.where(school_id: User.current.school_id).pluck(:shixun_id) shixun_ids = shixun_ids.reject(&:blank?).length == 0 ? -1 : shixun_ids.join(",") - @shixuns = @shixuns.where("use_scope = 0 or id in (#{shixun_ids})").unhidden.published.or(@shixuns.where(id: User.current.shixuns)) + @shixuns = @shixuns.where("use_scope = 0 or id in (#{shixun_ids})").unhidden.publiced.or(@shixuns.where(id: User.current.shixuns)) end end