From 19bb00fdc5208cd2f818264b7fc33d86f6276688 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 17 Jul 2019 18:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/discusses_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/discusses_service.rb b/app/services/discusses_service.rb index cebdf426..9c242554 100644 --- a/app/services/discusses_service.rb +++ b/app/services/discusses_service.rb @@ -38,7 +38,7 @@ class DiscussesService # group by d.dis_id order by cnt desc) a group by a.name # order by cnt desc limit 9").map{|ht| ht.attributes.dup} tag_id = ShixunTagRepertoire.joins(:shixun).order("myshixuns_count desc").pluck(:tag_repertoire_id).uniq.first(9) - hot_tags = TagRepertoire.select([:id, :name]).where(:id => tag_id).order("FIELD(id, #{tag_id.join(",")})") if tag_id + hot_tags = TagRepertoire.select([:id, :name]).where(:id => tag_id).order("FIELD(id, #{tag_id.join(",")})").map{|ht| ht.attributes.dup} if tag_id memos = memo_list memos user_info = format_for_current_user current_user hot_memos = Memo.field_for_recommend.posts.hot.limit(4)