|
|
|
@ -20,7 +20,7 @@ class ShixunSearchService < ApplicationService
|
|
|
|
|
if type == "mine"
|
|
|
|
|
@shixuns = @shixuns.where(id: User.current.shixuns)
|
|
|
|
|
else
|
|
|
|
|
if User.current.admin? || User.current.business?
|
|
|
|
|
if User.current.admin? || User.current.business? || !User.current.school_id
|
|
|
|
|
@shixuns = @shixuns.where(hidden: 0)
|
|
|
|
|
else
|
|
|
|
|
none_shixun_ids = ShixunSchool.where("school_id != #{User.current.school_id}").pluck(:shixun_id)
|
|
|
|
|