|
@@ -505,11 +505,20 @@ public class ExamTest {
|
|
|
objectList = answers.stream()
|
|
objectList = answers.stream()
|
|
|
.map(val -> val.isBlank() ? -1 : Integer.parseInt(val))
|
|
.map(val -> val.isBlank() ? -1 : Integer.parseInt(val))
|
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ List<QuestionOption> list = questionOptionMapper.findByQuestionId(questionId);
|
|
|
|
|
+ List<String> correctAnswers = list.stream()
|
|
|
|
|
+ .filter(QuestionOption::getCorrect)
|
|
|
|
|
+ .map(QuestionOption::getContent)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ System.out.println();
|
|
|
} else {
|
|
} else {
|
|
|
objectList = Arrays.asList(answers);
|
|
objectList = Arrays.asList(answers);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
map.put(questionId, objectList);
|
|
map.put(questionId, objectList);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ System.out.println();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|