|
@@ -109,6 +109,9 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
updateWrapper.setSql("heat = IFNULL(heat, 0) + 1");
|
|
|
communityCollectionMapper.update(null, updateWrapper);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//一级层级
|
|
|
JSONObject collectionObject = new JSONObject();
|
|
|
collectionObject.put("CollectionName", communityCollection.getCollectionName());
|
|
@@ -185,6 +188,11 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
}
|
|
|
collectionObject.put("articleNumber", communityArticles.size());
|
|
|
|
|
|
+ //获取浏览量总数
|
|
|
+ collectionObject.put("pageViews",communityArticles.stream()
|
|
|
+ .mapToLong(CommunityArticle::getPageViews)
|
|
|
+ .sum());
|
|
|
+
|
|
|
List<CommunityCollectionArticleVo> collectionArticleVos = new ArrayList<>();
|
|
|
CommunityCollectionArticleVo collectionArticleVo = null;
|
|
|
for (CommunityArticle communityArticle : communityArticles) {
|