From 9920f2cfbe556ddc04f27dd31108003fb6e1e900 Mon Sep 17 00:00:00 2001 From: luogw <3132758203@qq.com> Date: Tue, 31 Mar 2026 15:50:56 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/project/interaction/domain/dto/ProduceDTO.java | 5 +---- .../domain/service/impl/SaveClusterDomainServiceImpl.java | 3 --- src/main/resources/application-test.yml | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/project/interaction/domain/dto/ProduceDTO.java b/src/main/java/com/project/interaction/domain/dto/ProduceDTO.java index c4a7951..6e740a2 100644 --- a/src/main/java/com/project/interaction/domain/dto/ProduceDTO.java +++ b/src/main/java/com/project/interaction/domain/dto/ProduceDTO.java @@ -11,11 +11,8 @@ public class ProduceDTO { int needSingleCount; int needMultipleCount; int needJudgmentCount; - int generateCount = 0; public boolean isCompleted() { - int totalNeed = needSingleCount + needJudgmentCount + needMultipleCount; - // 已生成数量等于总需要数量,或总需要数量≤0时,视为完成 - return generateCount >= totalNeed || totalNeed <= 0; + return needSingleCount <= 0 && needJudgmentCount <= 0 && needMultipleCount <= 0; } } diff --git a/src/main/java/com/project/interaction/domain/service/impl/SaveClusterDomainServiceImpl.java b/src/main/java/com/project/interaction/domain/service/impl/SaveClusterDomainServiceImpl.java index f48c2f5..f537d2a 100644 --- a/src/main/java/com/project/interaction/domain/service/impl/SaveClusterDomainServiceImpl.java +++ b/src/main/java/com/project/interaction/domain/service/impl/SaveClusterDomainServiceImpl.java @@ -220,9 +220,6 @@ public class SaveClusterDomainServiceImpl implements SaveClusterDomainService { // 更新剩余数量 int remainCount = needCount - generateNum; setNeedCount.accept(Math.max(0, remainCount)); // 确保剩余数量≥0 - - // 更新已生成总数量 - dto.setGenerateCount(dto.getGenerateCount() + generateNum); } private ProduceDTO buildDTO(Long sourceId , QuestionSourceTypeEnum sourceType, int needJudgmentCount,int needSingleCount, int needMultipleCount) { diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index eb80aba..2bc95af 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -59,7 +59,7 @@ mybatis-plus: type-aliases-package: com.proposal.**.domain.entity milvus: - host: 172.16.204.50 + host: 127.0.0.1 port: 19530 analysis: host: https://107pm707566hq.vicp.fun @@ -83,7 +83,7 @@ jwt: question: generation: # 限流速率:每秒允许的API请求数 - rate-limit: 1 + rate-limit: 4 downgrade: false # 队列配置 queue: