Ver código fonte

获取文章接口更新

fangqing 1 mês atrás
pai
commit
269d9566c5

+ 2 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityReportController.java

@@ -234,7 +234,8 @@ public class CommunityReportController {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
+            System.out.println(e.getMessage());
+            throw new ProjectException();
         }
         return AjaxResult.success(communityReportPunishVo);
     }

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

@@ -146,6 +146,11 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
         List<CommunityArticleVo> communityArticleVos = null;
         //找出板块下的分类
         List<Long> classIds = communityArticle.getClassIds();
+        System.out.println("classIds: " + classIds);
+        if (classIds != null && classIds.contains(0L)) { // Check for null and then use contains()
+            searchType = 3;
+        }
+
         Long id = communityArticle.getId();
         List<Long> articleIds = communityArticle.getArticleIds();
         Integer pageTagType = communityArticle.getPageTagType();