hsun 2 vuotta sitten
vanhempi
commit
921879765d
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      models/tables/yb_community_question_comment/query.go

+ 2 - 2
models/tables/yb_community_question_comment/query.go

@@ -128,11 +128,11 @@ func GetUserAvatarRandom() (item *UserAvatarRandom, err error) {
 	return
 	return
 }
 }
 
 
-// GetHotListByCommunityQuestionIds 根据问答id列表获取精选留言
+// GetHotListByCommunityQuestionIds 根据问答id列表获取精选留言-精选时间倒序
 func GetHotListByCommunityQuestionIds(communityQuestionIds []uint32) (items []*YbCommunityQuestionComment, err error) {
 func GetHotListByCommunityQuestionIds(communityQuestionIds []uint32) (items []*YbCommunityQuestionComment, err error) {
 	err = global.DEFAULT_MYSQL.Model(YbCommunityQuestionComment{}).
 	err = global.DEFAULT_MYSQL.Model(YbCommunityQuestionComment{}).
 		Where("community_question_id IN (?) AND enabled = 1 AND is_hot = 1 AND type = 1", communityQuestionIds).
 		Where("community_question_id IN (?) AND enabled = 1 AND is_hot = 1 AND type = 1", communityQuestionIds).
-		Order("community_question_id DESC").
+		Order("hot_time DESC").
 		Find(&items).Error
 		Find(&items).Error
 	return
 	return
 }
 }