Bladeren bron

修复导入主观题间隔分没有判断是否为0的bug

luoshi 6 jaren geleden
bovenliggende
commit
cb2103581b
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectiveQuestionDTO.java

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectiveQuestionDTO.java

@@ -71,7 +71,7 @@ public class SubjectiveQuestionDTO implements QuestionDTO {
         question.setObjective(false);
         question.setMainTitle(StringUtils.trimToNull(title));
         question.setTotalScore(totalScore);
-        question.setIntervalScore(intervalScore != null ? intervalScore : 1d);
+        question.setIntervalScore(intervalScore != null && intervalScore > 0 ? intervalScore : 1d);
         question.setTotalCount(0);
         question.setZeroCount(0);
         question.setFullCount(0);