|
@@ -159,7 +159,6 @@ public class KmtExerciseQuestionDealServiceImpl implements KmtExerciseQuestionDe
|
|
|
if (StringUtil.isBlank(nextQuestion.getParentId())){
|
|
|
kmtExerciseQuestion.setParentId(null);
|
|
|
kmtExerciseQuestion.setQuestionClassType(1);
|
|
|
- kmtExerciseMapper.updateParentIdAndClassType(newQuestionId, 2, book.getBookId(), request.getNum());
|
|
|
} else {
|
|
|
kmtExerciseQuestion.setParentId(nextQuestion.getParentId());
|
|
|
kmtExerciseQuestion.setQuestionClassType(2);
|
|
@@ -182,7 +181,10 @@ public class KmtExerciseQuestionDealServiceImpl implements KmtExerciseQuestionDe
|
|
|
kmtExerciseQuestion.setHandlerSubmitTime(DateUtil.parse_yyyyMMddHHmmss("1970-01-01 00:00:01"));
|
|
|
kmtExerciseQuestion.setQuestionPath(nextQuestion.getQuestionPath().substring(0, nextQuestion.getQuestionPath().lastIndexOf("/")) + "/" + newQuestionId + ".json");
|
|
|
logger.error(JSON.toJSONString(kmtExerciseQuestion));
|
|
|
- kmtExerciseQuestionService.save(kmtExerciseQuestion);
|
|
|
+ kmtExerciseQuestion = kmtExerciseQuestionService.save(kmtExerciseQuestion);
|
|
|
+ if (request.getQuestionClassType() == 2 && StringUtil.isBlank(nextQuestion.getParentId())) {
|
|
|
+ kmtExerciseMapper.updateParentIdAndClassType(kmtExerciseQuestion.getId(), 2, book.getBookId(), request.getNum());
|
|
|
+ }
|
|
|
return kmtExerciseQuestion;
|
|
|
}
|
|
|
|