weiwenhai 6 سال پیش
والد
کامیت
2be392af42

+ 7 - 0
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/impl/QuesServiceImpl.java

@@ -164,6 +164,13 @@ public class QuesServiceImpl implements QuesService{
      * @param question
      */
     public Question saveQues(Question question) {
+    	if(question.getDifficultyDegree() > 0 && question.getDifficultyDegree()<0.4){
+        	question.setDifficulty("难");
+        }else if(question.getDifficultyDegree() > 0.3 && question.getDifficultyDegree()<0.8){
+        	question.setDifficulty("中");
+        }else {
+        	question.setDifficulty("易");
+		}
     	String now = CommonUtils.getCurDateTime();
         if (StringUtils.isNotEmpty(question.getId())) {
             question.setCreateTime(now);