Browse Source

bug修复

master
luoweijian 2 months ago
parent
commit
f19f188a03
  1. 3
      src/main/java/com/project/classicpaper/domain/service/impl/RegenerateQuestionDomainServiceImpl.java
  2. 2
      src/main/resources/application-test.yml

3
src/main/java/com/project/classicpaper/domain/service/impl/RegenerateQuestionDomainServiceImpl.java

@ -206,6 +206,9 @@ public class RegenerateQuestionDomainServiceImpl implements RegenerateQuestionDo
.eq(RegenerateQuestionTaskEntity::getPaperQuestionId, paperQuestionId) .eq(RegenerateQuestionTaskEntity::getPaperQuestionId, paperQuestionId)
.eq(RegenerateQuestionTaskEntity::getStatus, 0)); .eq(RegenerateQuestionTaskEntity::getStatus, 0));
if (existingTask != null) { if (existingTask != null) {
// 已有任务正在生题中,先把 questionId 置空,避免前端看到旧题
paperQuestion.setQuestionId(null);
classicPaperQuestionBaseService.updateById(paperQuestion);
throw new BusinessErrorException("该题目正在重新生题中,请稍后再试"); throw new BusinessErrorException("该题目正在重新生题中,请稍后再试");
} }

2
src/main/resources/application-test.yml

@ -9,7 +9,7 @@ spring:
master: master:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
password: Itc@123456 password: Itc@123456
url: jdbc:mysql://8.129.84.155:3306/ai_evaluator_test?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true url: jdbc:mysql://8.129.84.155:3306/ai_evaluator_test?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true
username: root username: root
# Redis # Redis
data: data:

Loading…
Cancel
Save