作者 郑周

Merge branch 'dev' into test

@@ -258,11 +258,13 @@ type ( @@ -258,11 +258,13 @@ type (
258 } 258 }
259 259
260 SimpleComment { 260 SimpleComment {
261 - Id int64 `json:"id"`  
262 - Content string `json:"content"` // 评论内容  
263 - Show int `json:"show"` // 评论的展示状态(0显示、1不显示)  
264 - AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人  
265 - MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本 261 + Id int64 `json:"id"`
  262 + Content string `json:"content"` // 评论内容
  263 + Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
  264 + AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人
  265 + MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本
  266 + CountReply int `json:"countReply"` // 用户回复数量
  267 + CountUserLove int `json:"countUserLove"` // 用户点赞数量
266 } 268 }
267 269
268 MiniBeLikedRequest{ 270 MiniBeLikedRequest{
@@ -187,10 +187,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma @@ -187,10 +187,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
187 // 评论 187 // 评论
188 if v, ok := commentIdMap[item.CommentId]; ok && v != nil { 188 if v, ok := commentIdMap[item.CommentId]; ok && v != nil {
189 to.Comment = &types.SimpleComment{ 189 to.Comment = &types.SimpleComment{
190 - Id: v.Id,  
191 - Content: v.Content,  
192 - Show: int(v.Show),  
193 - MatchUrl: v.MatchUrl, 190 + Id: v.Id,
  191 + Content: v.Content,
  192 + Show: int(v.Show),
  193 + CountReply: v.CountReply,
  194 + CountUserLove: v.CountUserLove,
  195 + MatchUrl: v.MatchUrl,
194 } 196 }
195 to.Comment.AtWho = make([]types.CommentAtWho, 0) 197 to.Comment.AtWho = make([]types.CommentAtWho, 0)
196 for _, who := range v.AtWho { 198 for _, who := range v.AtWho {
@@ -204,10 +206,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma @@ -204,10 +206,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
204 // 被回复的评论 206 // 被回复的评论
205 if v, ok := commentIdMap[item.CommentParentId]; ok && v != nil { 207 if v, ok := commentIdMap[item.CommentParentId]; ok && v != nil {
206 to.CommentParent = &types.SimpleComment{ 208 to.CommentParent = &types.SimpleComment{
207 - Id: v.Id,  
208 - Content: v.Content,  
209 - Show: int(v.Show),  
210 - MatchUrl: v.MatchUrl, 209 + Id: v.Id,
  210 + Content: v.Content,
  211 + Show: int(v.Show),
  212 + CountReply: v.CountReply,
  213 + CountUserLove: v.CountUserLove,
  214 + MatchUrl: v.MatchUrl,
211 } 215 }
212 to.CommentParent.AtWho = make([]types.CommentAtWho, 0) 216 to.CommentParent.AtWho = make([]types.CommentAtWho, 0)
213 for _, who := range v.AtWho { 217 for _, who := range v.AtWho {
@@ -107,10 +107,12 @@ func (l *MiniMyBeLikedLogic) NewItemSimple(love *domain.UserLoveFlag, company *d @@ -107,10 +107,12 @@ func (l *MiniMyBeLikedLogic) NewItemSimple(love *domain.UserLoveFlag, company *d
107 107
108 if comment != nil { 108 if comment != nil {
109 item.Comment = &types.SimpleComment{ 109 item.Comment = &types.SimpleComment{
110 - Id: comment.Id,  
111 - Content: comment.Content,  
112 - Show: int(comment.Show),  
113 - MatchUrl: comment.MatchUrl, 110 + Id: comment.Id,
  111 + Content: comment.Content,
  112 + Show: int(comment.Show),
  113 + CountReply: comment.CountReply,
  114 + CountUserLove: comment.CountUserLove,
  115 + MatchUrl: comment.MatchUrl,
114 } 116 }
115 item.Comment.AtWho = make([]types.CommentAtWho, 0) 117 item.Comment.AtWho = make([]types.CommentAtWho, 0)
116 for _, who := range comment.AtWho { 118 for _, who := range comment.AtWho {
@@ -107,10 +107,12 @@ func (l *MiniMyLikeLogic) NewItemSimple(love *domain.UserLoveFlag, company *doma @@ -107,10 +107,12 @@ func (l *MiniMyLikeLogic) NewItemSimple(love *domain.UserLoveFlag, company *doma
107 107
108 if comment != nil { 108 if comment != nil {
109 item.Comment = &types.SimpleComment{ 109 item.Comment = &types.SimpleComment{
110 - Id: comment.Id,  
111 - Content: comment.Content,  
112 - Show: int(comment.Show),  
113 - MatchUrl: comment.MatchUrl, 110 + Id: comment.Id,
  111 + Content: comment.Content,
  112 + Show: int(comment.Show),
  113 + CountReply: comment.CountReply,
  114 + CountUserLove: comment.CountUserLove,
  115 + MatchUrl: comment.MatchUrl,
114 } 116 }
115 item.Comment.AtWho = make([]types.CommentAtWho, 0) 117 item.Comment.AtWho = make([]types.CommentAtWho, 0)
116 for _, who := range comment.AtWho { 118 for _, who := range comment.AtWho {
@@ -599,11 +599,13 @@ type MyLikeItem struct { @@ -599,11 +599,13 @@ type MyLikeItem struct {
599 } 599 }
600 600
601 type SimpleComment struct { 601 type SimpleComment struct {
602 - Id int64 `json:"id"`  
603 - Content string `json:"content"` // 评论内容  
604 - Show int `json:"show"` // 评论的展示状态(0显示、1不显示)  
605 - AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人  
606 - MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本 602 + Id int64 `json:"id"`
  603 + Content string `json:"content"` // 评论内容
  604 + Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
  605 + AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人
  606 + MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本
  607 + CountReply int `json:"countReply"` // 用户回复数量
  608 + CountUserLove int `json:"countUserLove"` // 用户点赞数量
607 } 609 }
608 610
609 type MiniBeLikedRequest struct { 611 type MiniBeLikedRequest struct {