|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.project.exam.domain.job; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import com.project.exam.domain.entity.ExamRecordEntity; |
|
|
|
import com.project.exam.mapper.ExamRecordMapper; |
|
|
|
import com.project.interaction.domain.dto.AiScoringRequestDTO; |
|
|
|
@ -84,6 +85,7 @@ public class ShortAnswerScoringJob { |
|
|
|
List<ExamRecordEntity> records = examRecordMapper.selectList( |
|
|
|
new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<ExamRecordEntity>() |
|
|
|
.eq(ExamRecordEntity::getScoringStatus, ExamRecordScoringStatusEnum.PENDING.getValue()) |
|
|
|
.isNotNull(ExamRecordEntity::getSubmitTime) |
|
|
|
.orderByAsc(ExamRecordEntity::getSubmitTime)); |
|
|
|
|
|
|
|
if (records.isEmpty()) { |
|
|
|
@ -194,6 +196,12 @@ public class ShortAnswerScoringJob { |
|
|
|
int totalPoints = options.size(); |
|
|
|
request.setOptions(options); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(options)) { |
|
|
|
log.warn(">>> [简答题评分任务] 题目缺少得分点, questionId={}", snapshot.getQuestionId()); |
|
|
|
snapshot.setScoringStatus(ExamRecordScoringStatusEnum.FAILED.getValue()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 调用算法
|
|
|
|
AiScoringResponseDTO response = postToAiScoringDomainService.requestAiScoring(request); |
|
|
|
|
|
|
|
|