fix(study): 解决学生考试记录查询空指针异常

dev
zhaokai 2026-03-06 09:02:40 +08:00
parent 0057a05c9c
commit 85df63f9af
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ public class StudentExamRecordQueryExe {
}
public SingleResponse<StudentExamRecordCO> executeGetInfoByStudentId(String studentId){
StudentExamRecordDO studentExamRecordDO = studentExamRecordRepository.getInfoByStudentId(studentId);
if(studentExamRecordDO == null){
return SingleResponse.of(null);
}
StudentExamRecordCO studentExamRecordCO = new StudentExamRecordCO();
BeanUtils.copyProperties(studentExamRecordDO, studentExamRecordCO);
List<StudentExamRecordItemDO> recordList = studentExamRecordItemRepository.listByExamRecordId(studentExamRecordDO.getStudentExamRecordId());