From 019a88b2917aff90dea793b5fc48c5ff8b576135 Mon Sep 17 00:00:00 2001
From: guyue <1721849008@qq.com>
Date: 星期三, 30 七月 2025 17:57:13 +0800
Subject: [PATCH] 将任务为processing改为pending

---
 src/main/java/com/linghu/service/impl/KeywordServiceImpl.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java b/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java
index c8a3bd6..21e800f 100644
--- a/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java
+++ b/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java
@@ -36,13 +36,15 @@
             return ResponseResult.error("关键词不存在");
         }
         if (!"completed".equals(keyword.getStatus())) {
-            return ResponseResult.error("关键词采集未完成");
+            return ResponseResult.success();
         }
         List<KeywordStaticsVO> statics = this.getBaseMapper().statics(keywordId, questionId, keyword.getNum());
-        vo.setNowRecord(statics);
+        List<KeywordStaticsVO> top30 = statics.subList(0, Math.min(statics.size(), 30));
+        vo.setNowRecord(top30);
         if (keyword.getNum() > 1) {
-            statics = this.getBaseMapper().statics(keywordId, questionId, keyword.getNum() - 1);
-            vo.setBeforeRecord(statics);
+            statics = this.getBaseMapper().statics(keywordId, questionId, 1);
+            top30 = statics.subList(0, Math.min(statics.size(), 30));
+            vo.setBeforeRecord(top30);
         }
         return ResponseResult.success(vo);
     }

--
Gitblit v1.7.1