|
|
|
@ -38,7 +38,14 @@ class Weapps::ShixunSearchService < ApplicationService
|
|
|
|
|
keyword: "%#{keyword}%", name: "%#{keyword.split(" ").join("%")}%").distinct
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
shixuns.order("#{sort_str} #{order_str}")
|
|
|
|
|
order =
|
|
|
|
|
if sort_str == "wechat_myshixuns_count"
|
|
|
|
|
"is_wechat_support desc, myshixuns_count #{order_str}"
|
|
|
|
|
else
|
|
|
|
|
"#{sort_str} #{order_str}"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
shixuns.order(order)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|