Ver Fonte

文章代码优化

fangzhen há 5 meses atrás
pai
commit
f8fbe1af5a

+ 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);