Browse Source

文章代码优化

fangzhen 5 tháng trước cách đây
mục cha
commit
eae658a992

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

@@ -144,7 +144,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
         //根据分类查找文章
         int offset = (pageNum - 1) * pageSize;
         communityArticleVos = communityArticleMapper.selectCommunityArticleList(communityArticle, classIds, offset, pageSize, searchType);
-        rspData.setTotal(communityArticleMapper.selectCommunityArticleCount(communityArticle, classIds, searchType));
+        rspData.setTotal(communityArticleVos.size());
         List<CommunityArticleVo> communityArticleVos_copy = new ArrayList<>(communityArticleVos);
         for (CommunityArticleVo articleVo : communityArticleVos_copy) {
             //判断当前文章是否被用户拉黑