xiatian 1 tahun lalu
induk
melakukan
ae15c5f05e

+ 6 - 5
src/main/java/cn/com/qmth/export/KdQuestion.java

@@ -9,7 +9,7 @@ public class KdQuestion {
 	private QuesStructType quesStructType;
 	private Integer structType;
 	private Boolean objective;
-	private YunkaiDifficulty difficulty;
+	private Double difficultyDegree;
 	private String body;
 	private String answer;
 	private String qtype;
@@ -117,12 +117,13 @@ public class KdQuestion {
 		this.qst = qst;
 	}
 
-	public YunkaiDifficulty getDifficulty() {
-		return difficulty;
+
+	public Double getDifficultyDegree() {
+		return difficultyDegree;
 	}
 
-	public void setDifficulty(YunkaiDifficulty difficulty) {
-		this.difficulty = difficulty;
+	public void setDifficultyDegree(Double difficultyDegree) {
+		this.difficultyDegree = difficultyDegree;
 	}
 
 	public QuesStructType getQuesStructType() {

+ 2 - 1
src/main/java/cn/com/qmth/export/MyConsumer.java

@@ -83,7 +83,8 @@ public class MyConsumer extends Consumer<PaperExportDto> {
 				q.setBody(disposeImg(resultSet.getString("topic"), courseCode));
 				q.setQst(YunkaiQuesStructType.getByYunKaiType(resultSet.getInt("question_type")));
 				q.setQuesStructType(QuesStructType.getQuesStructTypeById(q.getQst().getType()));
-				q.setDifficulty(YunkaiDifficulty.getByYunKaiType(resultSet.getInt("difficulty")));
+				YunkaiDifficulty yd=YunkaiDifficulty.getByYunKaiType(resultSet.getInt("difficulty"));
+				q.setDifficultyDegree(yd==null?0.5:yd.getType());
 //				if (!q.getQst().isObjective()) {
 //					continue;
 //				}