From 565e8ac5039eb2c7c63695f9e3494ef00cb47185 Mon Sep 17 00:00:00 2001 From: guyue <1721849008@qq.com> Date: 星期五, 18 七月 2025 15:15:23 +0800 Subject: [PATCH] 更改为传json --- src/main/java/com/linghu/service/impl/KeywordServiceImpl.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java b/src/main/java/com/linghu/service/impl/KeywordServiceImpl.java index 087c037..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, 1); - vo.setBeforeRecord(statics); + top30 = statics.subList(0, Math.min(statics.size(), 30)); + vo.setBeforeRecord(top30); } return ResponseResult.success(vo); } -- Gitblit v1.7.1