作者 yangfu

增加评论信息列表

... ... @@ -167,11 +167,11 @@ func Comments(header *protocol.RequestHeader, request *protocol.CommentsRequest)
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...)) {
//
}
}
//if len(commentIds) > 0 {
// if !utils.ExecuteSqlByRoll(true, agg.GetIncrementSqlBatch("comment", "view_total", 1, commentIds...)) {
// //
// }
//}
return
}
... ... @@ -228,7 +228,7 @@ func CommentDetailsSingle(header *protocol.RequestHeader, request *protocol.Comm
Id: comment.Id,
Provider: baseUserInfo,
Content: comment.Content,
CreateTime: comment.CreateAt.Unix(),
CreateTime: comment.CreateAt.Unix() * 1000,
ViewTotal: comment.ViewTotal,
ZanTotal: comment.ZanTotal,
CommentTotal: comment.CommentTotal,
... ... @@ -237,6 +237,9 @@ func CommentDetailsSingle(header *protocol.RequestHeader, request *protocol.Comm
if exists, _ = models.ExitsChanceFavorite(header.UserId, header.CompanyId, comment.Id, protocol.MarkFlagZan); exists {
rsp.Comment.IsZan = true
}
if !utils.ExecuteSqlByRoll(true, agg.GetIncrementSqlBatch("comment", "view_total", 1, []int64{request.Id}...)) {
//
}
return
}
... ...