Quellcode durchsuchen

获取文章条件bug修复

fangzhen vor 1 Woche
Ursprung
Commit
80b842b171

+ 24 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityArticleController.java

@@ -176,6 +176,9 @@ public class CommunityArticleController extends BaseController {
                 }
                 keyBuilder.append("classIds=").append(classIdsBuilder.toString()).append(":");
             }
+            if (article.getId() != null) {
+                keyBuilder.append("id=").append(article.getId()).append(":");
+            }
             if (article.getCircleId() != null) {
                 keyBuilder.append("circleId=").append(article.getCircleId()).append(":");
             }
@@ -183,6 +186,27 @@ public class CommunityArticleController extends BaseController {
                 keyBuilder.append("title=").append(article.getTitle()).append(":");
             }
             // 可以根据需要添加更多条件
+            if (article.getUserId() != null) {
+                keyBuilder.append("userId=").append(article.getUserId()).append(":");
+            }
+            if (article.getUserIds() != null) {
+                keyBuilder.append("userIds=").append(article.getUserIds()).append(":");
+            }
+            if (article.getTags() != null) {
+                keyBuilder.append("tags=").append(article.getTags()).append(":");
+            }
+            if (article.getArticleIds() != null) {
+                keyBuilder.append("articleIds=").append(article.getArticleIds()).append(":");
+            }
+            if (article.getPageTagType() != null) {
+                keyBuilder.append("pageTagType=").append(article.getPageTagType()).append(":");
+            }
+            if (article.getNoCollection() != null) {
+                keyBuilder.append("noCollection=").append(article.getNoCollection()).append(":");
+            }
+            if (article.getIsDraft() != null) {
+                keyBuilder.append("isDraft=").append(article.getIsDraft()).append(":");
+            }
         }
 
         // 添加分页和搜索类型信息