|
@@ -203,7 +203,11 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
int likeCount = communityLikeMapper.selectCount(new QueryWrapper<CommunityLike>().eq("article_id", communityArticle.getId())).intValue();
|
|
|
collectionArticleVo.setLikeCount(likeCount);
|
|
|
//设置用户评论数
|
|
|
- int commentCount = communityArticleCommentMapper.selectCount(new QueryWrapper<CommunityArticleComment>().eq("article_id", communityArticle.getId())).intValue();
|
|
|
+ int commentCount = communityArticleCommentMapper.selectCount(new QueryWrapper<CommunityArticleComment>().eq("article_id", communityArticle.getId()).and((wrapper) -> {
|
|
|
+ wrapper.ne("is_delete", true)
|
|
|
+ .or()
|
|
|
+ .isNull("is_delete");
|
|
|
+ })).intValue();
|
|
|
collectionArticleVo.setCommentCount(commentCount);
|
|
|
//设置文章封面
|
|
|
List<CommunityArticleImages> articleImages = communityArticleImagesMapper.selectList(new QueryWrapper<CommunityArticleImages>()
|