|
@@ -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);
|