Browse Source

合集游览更新

fangqing 4 months ago
parent
commit
ffbe761765

+ 2 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/service/CommunityArticleServiceImpl.java

@@ -159,6 +159,8 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
         //根据分类查找文章
         //根据分类查找文章
         int offset = (pageNum - 1) * pageSize;
         int offset = (pageNum - 1) * pageSize;
         communityArticleVos = communityArticleMapper.selectCommunityArticleList(communityArticle, classIds, offset, pageSize, searchType);
         communityArticleVos = communityArticleMapper.selectCommunityArticleList(communityArticle, classIds, offset, pageSize, searchType);
+
+
         rspData.setTotal(communityArticleVos.size());
         rspData.setTotal(communityArticleVos.size());
         List<CommunityArticleVo> communityArticleVos_copy = new ArrayList<>(communityArticleVos);
         List<CommunityArticleVo> communityArticleVos_copy = new ArrayList<>(communityArticleVos);
         for (CommunityArticleVo articleVo : communityArticleVos_copy) {
         for (CommunityArticleVo articleVo : communityArticleVos_copy) {

+ 2 - 2
ruoyi-generator/src/main/resources/mapper/community/CommunityCollectionMapper.xml

@@ -12,7 +12,7 @@
         a.images,
         a.images,
         a.is_delete,
         a.is_delete,
         COUNT(b.article_id) AS articleCount,
         COUNT(b.article_id) AS articleCount,
-        SUM(c.page_views) AS pageViews,
+        SUM(a.heat) AS pageViews,
         a.create_by,
         a.create_by,
         a.update_by,
         a.update_by,
         a.create_time,
         a.create_time,
@@ -46,7 +46,7 @@
         a.images,
         a.images,
         a.is_delete,
         a.is_delete,
         COUNT(b.article_id) AS articleCount,
         COUNT(b.article_id) AS articleCount,
-        SUM(c.page_views) AS pageViews,
+        SUM(a.heat) AS pageViews,
         a.create_by,
         a.create_by,
         a.update_by,
         a.update_by,
         a.create_time,
         a.create_time,