From 74992bcc2bf34c19c4a65a1680c012ade7e56d4c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 7 Feb 2020 12:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/weapps/shixun_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/weapps/shixun_search_service.rb b/app/services/weapps/shixun_search_service.rb index 5c09cb4af..c0a0f2923 100644 --- a/app/services/weapps/shixun_search_service.rb +++ b/app/services/weapps/shixun_search_service.rb @@ -17,7 +17,7 @@ class Weapps::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.publiced.or(shixuns.where(id: User.current.shixuns)) + shixuns = shixuns.where("use_scope = 0 or shixuns.id in (#{shixun_ids})").unhidden.publiced.or(shixuns.where(id: User.current.shixuns)) end ## 筛选 难度