Browse Source

update content-service/exam ExamTest

reghao 7 months ago
parent
commit
2e3e3b4325

+ 9 - 0
content/content-service/src/test/java/cn/reghao/tnb/content/app/exam/service/ExamTest.java

@@ -505,11 +505,20 @@ public class ExamTest {
                 objectList = answers.stream()
                         .map(val -> val.isBlank() ? -1 : Integer.parseInt(val))
                         .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 {
                 objectList = Arrays.asList(answers);
             }
 
             map.put(questionId, objectList);
         });
+
+        System.out.println();
     }
 }