fangzhen преди 5 месеца
родител
ревизия
ef843da0e1
променени са 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);