ソースを参照

fix: 完善多选题判题

weijin 4 年 前
コミット
ee94dae8a0

+ 1 - 1
judgement-common/src/main/java/cn/seecoder/judgement/vo/question/BaseQuestionVO.java

@@ -49,7 +49,7 @@ public abstract class BaseQuestionVO {
         this.keyPoints = questionVO.getKeyPoints();
         this.keyPoints = questionVO.getKeyPoints();
         this.tags = questionVO.getTags();
         this.tags = questionVO.getTags();
         this.knowledgeId = questionVO.getKnowledgeId();
         this.knowledgeId = questionVO.getKnowledgeId();
-        this.lastModified = Date.from(questionVO.getLastModifiedTime());
+        this.lastModified = questionVO.getLastModifiedTime()==null?null:Date.from(questionVO.getLastModifiedTime());
     }
     }
 
 
     /**
     /**

+ 3 - 1
judgement-common/src/main/java/cn/seecoder/judgement/vo/question/MultipleChoiceQuestionVO.java

@@ -26,6 +26,8 @@ public class MultipleChoiceQuestionVO extends BaseQuestionVO {
 
 
     @Override
     @Override
     public boolean pass(Object answer) {
     public boolean pass(Object answer) {
-        return this.answer.equals(String.valueOf(answer));
+        String standard = this.answer.replaceAll(";", "");
+        answer = ((String)answer).replaceAll(";", "");
+        return standard.equals(String.valueOf(answer));
     }
     }
 }
 }