fix(study): 解决班级考试试卷查询空指针异常

dev
zhaokai 2026-03-09 09:45:48 +08:00
parent 9be59053f1
commit 1d0d5f8ff3
2 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,9 @@ public class ClassExamPaperQueryExe {
*/ */
public SingleResponse<ClassExamPaperCO> executeGetInfoByClassId(String classId) { public SingleResponse<ClassExamPaperCO> executeGetInfoByClassId(String classId) {
ClassExamPaperDO classExamPaperDO = classExamPaperRepository.findByClassId(classId); ClassExamPaperDO classExamPaperDO = classExamPaperRepository.findByClassId(classId);
if(classExamPaperDO == null){
return SingleResponse.of(null);
}
List<QuestionDO> questionDOList = questionRepository.getInfoByExamPaperId(classExamPaperDO.getExamPaperId()); List<QuestionDO> questionDOList = questionRepository.getInfoByExamPaperId(classExamPaperDO.getExamPaperId());
List<QuestionCO> questionCOList = BeanUtil.copyToList(questionDOList, QuestionCO.class); List<QuestionCO> questionCOList = BeanUtil.copyToList(questionDOList, QuestionCO.class);
ClassExamPaperCO classExamPaperCO = new ClassExamPaperCO(); ClassExamPaperCO classExamPaperCO = new ClassExamPaperCO();

View File

@ -27,6 +27,7 @@ public class ClassPageQry extends PageQuery {
private String likeName; private String likeName;
private String eqTrainType; private String eqTrainType;
private Integer eqState; private Integer eqState;
private Integer neState;
private String geStartTime; private String geStartTime;
private String leStartTime; private String leStartTime;
private String geEndTime; private String geEndTime;