...
|
...
|
@@ -48,7 +48,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res |
|
|
var companyIdMap = map[int64]*domain.Company{}
|
|
|
var userIdMap = map[int64]*domain.User{}
|
|
|
var articleIdMap = map[int64]*domain.Article{}
|
|
|
var commentIdMap = map[int64]*domain.Comment{}
|
|
|
var commentIdMap = map[int64]*domain.ArticleComment{}
|
|
|
//var discussionIdMap = map[int64]int{}
|
|
|
//var discussionOpinionIdMap = map[int64]int{}
|
|
|
for _, item := range list {
|
...
|
...
|
@@ -126,7 +126,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res |
|
|
|
|
|
// 获取评论
|
|
|
if len(commentIds) > 0 {
|
|
|
_, commentList, err := l.svcCtx.CommentRepository.Find(l.ctx, conn, domain.NewQueryOptions().
|
|
|
_, commentList, err := l.svcCtx.ArticleCommentRepository.Find(l.ctx, conn, domain.NewQueryOptions().
|
|
|
WithFindOnly().
|
|
|
WithKV("ids", commentIds).
|
|
|
WithKV("limit", len(commentIds)))
|
...
|
...
|
@@ -192,12 +192,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res |
|
|
}
|
|
|
}
|
|
|
|
|
|
if _, ok := commentIdMap[item.CommentId]; ok {
|
|
|
if v, ok := commentIdMap[item.CommentId]; ok {
|
|
|
to.Comment = &types.SimpleComment{
|
|
|
//Id: v.Id,
|
|
|
//Title: v.Title,
|
|
|
//CountLove: v.CountLove,
|
|
|
//CountComment: v.CountComment,
|
|
|
Id: v.Id,
|
|
|
Content: v.Content,
|
|
|
CountLove: v.CountUserLove,
|
|
|
CountComment: v.CountReply,
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|