소스 검색

文章代码优化

fangzhen 5 달 전
부모
커밋
f8fbe1af5a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ruoyi-generator/src/main/java/com/ruoyi/generator/service/CommunityArticleServiceImpl.java

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

@@ -136,7 +136,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
             communityArticleMapper.updateById(article);
         }
 
-        if (!articleIds.isEmpty()) {
+        if (articleIds != null && !articleIds.isEmpty()) {
             for (Long articleId : articleIds) {
                 //获取指定文章详细内容,文章浏览量+1
                 CommunityArticle article = communityArticleMapper.selectById(articleId);