...
|
...
|
@@ -77,6 +77,9 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( |
|
|
tags = append(tags, val.Name)
|
|
|
}
|
|
|
}
|
|
|
// 查询我是否已关注文章的作者
|
|
|
|
|
|
follow, _ := l.svcCtx.UserFollowRepository.FindOneUserFollowing(l.ctx, conn, int64(req.UserId), articleInfo.AuthorId)
|
|
|
|
|
|
sortBy := domain.SortArticleSection(sectionList)
|
|
|
sort.Sort(sortBy)
|
...
|
...
|
@@ -117,6 +120,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( |
|
|
Show: int(articleInfo.Show),
|
|
|
Edit: 0,
|
|
|
MeLoveFlag: meLoveFlag,
|
|
|
MeFollowFlag: 0,
|
|
|
Tags: tags,
|
|
|
}
|
|
|
if articleInfo.CreatedAt != articleInfo.UpdatedAt {
|
...
|
...
|
@@ -125,6 +129,8 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( |
|
|
for _, val := range articleInfo.Images {
|
|
|
resp.Images = append(resp.Images, val.Url)
|
|
|
}
|
|
|
|
|
|
if follow != nil {
|
|
|
resp.MeFollowFlag = 1
|
|
|
}
|
|
|
return
|
|
|
} |
...
|
...
|
|