Эх сурвалжийг харах

Merge branch 'yb/5.3' into debug

hsun 2 жил өмнө
parent
commit
b989f417fe

+ 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
 }

+ 6 - 5
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
 }