Ver código fonte

Merge branch 'yb/5.3'

hsun 2 anos atrás
pai
commit
a856e06d26

+ 2 - 2
logic/yb_community_question/yb_community_question_comment.go

@@ -365,8 +365,8 @@ func messageToAdmin(wxUser user.UserInfo, communityQuestionComment *yb_community
 	}
 	//站内消息
 	go systemMessageToAdmin(*vWangInfo, wxUser, communityQuestionComment)
-	//微信模板消息
-	go wxMessageToAdmin(*vWangInfo, communityQuestionComment)
+	//微信模板消息(2022-0823评论后不再通知管理员)
+	//go wxMessageToAdmin(*vWangInfo, communityQuestionComment)
 
 	return
 }

+ 8 - 7
models/tables/yb_community_question_comment/query.go

@@ -34,21 +34,22 @@ func GetListTotalByUserIdCommunityQuestionID(userId uint64, communityQuestionID
 	return
 }
 
-// GetHotListByCommunityQuestionID 获取报告的精选留言列表
+// GetHotListByCommunityQuestionID 获取报告的精选留言列表(2022-08-23修改为获取所有留言, 不再精选)
 func GetHotListByCommunityQuestionID(communityQuestionID int, offset, limit int) (list []*YbCommunityQuestionComment, err error) {
 	err = global.DEFAULT_MYSQL.Model(YbCommunityQuestionComment{}).
-		Where("community_question_id = ? AND enabled = 1 AND is_hot = 1 AND type = 1", communityQuestionID).
-		Order("is_top desc, hot_top_time desc, community_question_comment_id desc").
+		Where("community_question_id = ? AND enabled = 1 AND type = 1", communityQuestionID).
+		//Order("is_top desc, hot_top_time desc, community_question_comment_id desc").
+		Order("create_time DESC").
 		Offset(offset).
 		Limit(limit).
 		Scan(&list).Error
 	return
 }
 
-// GetHotListTotalByCommunityQuestionID 获取精选留言总条数
+// GetHotListTotalByCommunityQuestionID 获取精选留言总条数(2022-08-23修改为获取所有留言, 不再精选)
 func GetHotListTotalByCommunityQuestionID(communityQuestionID int) (total int64, err error) {
 	err = global.DEFAULT_MYSQL.Model(YbCommunityQuestionComment{}).
-		Where("community_question_id = ? AND enabled = 1 AND is_hot = 1 AND type = 1", communityQuestionID).
+		Where("community_question_id = ? AND enabled = 1 AND type = 1", communityQuestionID).
 		Count(&total).Error
 	return
 }
@@ -128,10 +129,10 @@ func GetUserAvatarRandom() (item *UserAvatarRandom, err error) {
 	return
 }
 
-// GetHotListByCommunityQuestionIds 根据问答id列表获取精选留言-精选时间倒序
+// GetHotListByCommunityQuestionIds 根据问答id列表获取精选留言-精选时间倒序(2022-0823不再精选,获取所有评论)
 func GetHotListByCommunityQuestionIds(communityQuestionIds []uint32) (items []*YbCommunityQuestionComment, err error) {
 	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 type = 1", communityQuestionIds).
 		Order("hot_time DESC").
 		Find(&items).Error
 	return