Browse Source

Merge branch 'aj_qa_avatar' into debug

longyu 2 years ago
parent
commit
5dadef153a

+ 2 - 0
logic/yb_community_question/yb_community_question_comment.go

@@ -267,6 +267,7 @@ func List(userId uint64, communityQuestionID int, hotFlag bool, page, pageSize i
 			UserImgUrl:                 utils.DEFAULT_HONGZE_USER_LOGO,
 			UserImgUrl:                 utils.DEFAULT_HONGZE_USER_LOGO,
 			CreateTime:                 v.CreateTime,
 			CreateTime:                 v.CreateTime,
 			ReplyList:                  nil,
 			ReplyList:                  nil,
+			QaAvatarUrl:                v.QaAvatarUrl,
 		}
 		}
 		if info, ok := usersMap[v.UserID]; ok && v.IsShowName == 1 {
 		if info, ok := usersMap[v.UserID]; ok && v.IsShowName == 1 {
 			tmp.UserName = info.NickName
 			tmp.UserName = info.NickName
@@ -390,6 +391,7 @@ func HandleCommentByCommunityQuestionItemList(userId uint64, questionList []*res
 		//最近一条 精选/我的 评论
 		//最近一条 精选/我的 评论
 		if ybCommunityQuestionCommentInfo, ok := ybCommunityQuestionCommentMap[uint32(v.CommunityQuestionID)]; ok {
 		if ybCommunityQuestionCommentInfo, ok := ybCommunityQuestionCommentMap[uint32(v.CommunityQuestionID)]; ok {
 			v.Comment = ybCommunityQuestionCommentInfo.Content
 			v.Comment = ybCommunityQuestionCommentInfo.Content
+			v.QaAvatarUrl = ybCommunityQuestionCommentInfo.QaAvatarUrl
 			v.CommentUserName = "匿名用户" + strconv.Itoa(int(3333+ybCommunityQuestionCommentInfo.UserID))
 			v.CommentUserName = "匿名用户" + strconv.Itoa(int(3333+ybCommunityQuestionCommentInfo.UserID))
 			if info, ok := usersMap[ybCommunityQuestionCommentInfo.UserID]; ok && ybCommunityQuestionCommentInfo.IsShowName == 1 {
 			if info, ok := usersMap[ybCommunityQuestionCommentInfo.UserID]; ok && ybCommunityQuestionCommentInfo.IsShowName == 1 {
 				v.CommentUserName = info.NickName
 				v.CommentUserName = info.NickName

+ 2 - 0
models/response/community.go

@@ -29,6 +29,7 @@ type CommunityQuestionItem struct {
 	CommentTotal    int                           `json:"comment_total" description:"总共评论数"`
 	CommentTotal    int                           `json:"comment_total" description:"总共评论数"`
 	Comment         string                        `json:"comment" description:"评论"`
 	Comment         string                        `json:"comment" description:"评论"`
 	CommentUserName string                        `json:"comment_user_name" description:"评论人"`
 	CommentUserName string                        `json:"comment_user_name" description:"评论人"`
+	QaAvatarUrl     string                        `description:"用户头像" json:"qa_avatar_url"`
 }
 }
 
 
 type CommunityQuestionAudioItem struct {
 type CommunityQuestionAudioItem struct {
@@ -111,6 +112,7 @@ type RespCommunityQuestionCommentItem struct {
 	UserName                   string    `description:"用户昵称" json:"user_name"`
 	UserName                   string    `description:"用户昵称" json:"user_name"`
 	UserImgUrl                 string    `description:"用户头像" json:"user_img_url"`
 	UserImgUrl                 string    `description:"用户头像" json:"user_img_url"`
 	CreateTime                 time.Time `description:"留言创建时间" json:"create_time"`
 	CreateTime                 time.Time `description:"留言创建时间" json:"create_time"`
+	QaAvatarUrl                string    `description:"用户头像" json:"qa_avatar_url"`
 	ReplyList                  []*ReplyItem
 	ReplyList                  []*ReplyItem
 }
 }