diff --git a/app/services/weapps/shixun_search_service.rb b/app/services/weapps/shixun_search_service.rb index 448bb1992..7e0310542 100644 --- a/app/services/weapps/shixun_search_service.rb +++ b/app/services/weapps/shixun_search_service.rb @@ -34,8 +34,7 @@ class Weapps::ShixunSearchService < ApplicationService unless params[:keyword].blank? keyword = params[:keyword].strip shixuns = shixuns.joins(:user). - where("concat(lastname, firstname) like :keyword or shixuns.name like :keyword", - keyword: "%#{keyword}%", name: "%#{keyword.split(" ").join("%")}%").distinct + where("shixuns.name like :keyword", keyword: "%#{keyword}%").distinct end shixuns.order("#{sort_str} #{order_str}")