...
|
...
|
@@ -135,6 +135,7 @@ func Comments(header *protocol.RequestHeader, request *protocol.CommentsRequest) |
|
|
baseUserInfo *protocol.BaseUserInfo
|
|
|
total int
|
|
|
exists bool
|
|
|
commentIds []int64
|
|
|
)
|
|
|
if comments, total, err = models.GetComments(0, request.SourceType, request.SourceId, request.LastId, request.PageSize); err != nil {
|
|
|
log.Error(err)
|
...
|
...
|
@@ -163,8 +164,14 @@ func Comments(header *protocol.RequestHeader, request *protocol.CommentsRequest) |
|
|
if exists, _ = models.ExitsChanceFavorite(header.UserId, header.CompanyId, comment.Id, protocol.MarkFlagZan); exists {
|
|
|
item.IsZan = true
|
|
|
}
|
|
|
commentIds = append(commentIds, comment.Id)
|
|
|
rsp.Comments = append(rsp.Comments, item)
|
|
|
}
|
|
|
if len(commentIds) > 0 {
|
|
|
if !utils.ExecuteSqlByRoll(true, agg.GetIncrementSqlBatch("comment", "view_total", 1, commentIds...)) {
|
|
|
//
|
|
|
}
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
|