|
@@ -90,6 +90,7 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
searchType = 1L;
|
|
|
}
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
+ List<CommunityCollectionArticleVo> collectionArticleVos = new ArrayList<>();
|
|
|
//查询合集表
|
|
|
CommunityCollection communityCollection = communityCollectionMapper.selectOne(new QueryWrapper<CommunityCollection>()
|
|
|
.eq("id", collectionId)
|
|
@@ -132,6 +133,8 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
collectionObject.put("heat", communityCollection.getHeat());
|
|
|
//浏览量设置默认值
|
|
|
collectionObject.put("pageViews",0);
|
|
|
+ collectionObject.put("articleNumber", 0);
|
|
|
+ collectionObject.put("articleNumber", 0);
|
|
|
|
|
|
|
|
|
//查询当前用户是否订阅
|
|
@@ -148,7 +151,7 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
follow = true;
|
|
|
}
|
|
|
collectionObject.put("follow", follow);
|
|
|
-
|
|
|
+ collectionObject.put("Article", collectionArticleVos);
|
|
|
//查询合集关联文章表
|
|
|
List<Object> articleIdsObj = collectionArticleMapper
|
|
|
.selectObjs(new QueryWrapper<CommunityCollectionArticle>()
|
|
@@ -197,7 +200,7 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
.mapToLong(CommunityArticle::getPageViews)
|
|
|
.sum());
|
|
|
|
|
|
- List<CommunityCollectionArticleVo> collectionArticleVos = new ArrayList<>();
|
|
|
+
|
|
|
CommunityCollectionArticleVo collectionArticleVo = null;
|
|
|
for (CommunityArticle communityArticle : communityArticles) {
|
|
|
collectionArticleVo = new CommunityCollectionArticleVo();
|