|
@@ -628,26 +628,26 @@ public class KmtExerciseQuestionDealServiceImpl implements KmtExerciseQuestionDe
|
|
|
|
|
|
|
|
|
// 判断为 1
|
|
|
- if (request.getEnumerate()==1){
|
|
|
- String path = this.removeQuestionNumMark(request.getStartX(), request.getStartY(), request.getEndX(), request.getEndY(), kmtExerciseQuestion.getImage());
|
|
|
- String content = JSONFileUtil.readJSONFile(PropertiesUtil.getValue("EXERCISE_JSON_FILE_PATH") + kmtExerciseQuestion.getQuestionPath());
|
|
|
- if (StringUtil.isNotBlank(content) && StringUtil.isNotBlank(path)) {
|
|
|
- Map<String, Object> map = JSON.parseObject(content, Map.class);
|
|
|
- ExerciseQuestionAnswerValue questionAnswerValue = ExerciseUtil.getExerciseQuestionAnswerValue(path);
|
|
|
- if (questionAnswerValue == null){
|
|
|
- map.put("question_json", "[]");
|
|
|
- } else {
|
|
|
- map.put("question_json", Collections.singletonList(questionAnswerValue));
|
|
|
- }
|
|
|
- map.put("question", "<img src='" + PropertiesUtil.getValue("STATIC_FILE_URL") + path + "'/>");
|
|
|
- map.put("userId",userId);
|
|
|
- map.put("questionPath",path);
|
|
|
- map.put("bookId",kmtExerciseQuestion.getBookId());
|
|
|
- //JSONFileUtil.saveJSONFile(PropertiesUtil.getValue("EXERCISE_JSON_FILE_PATH") + kmtExerciseQuestion.getQuestionPath(), JSON.toJSONString(map));
|
|
|
- questionInfoService.updateQuestionAndJsonByQuestionId(kmtExerciseQuestion.getId(), map);
|
|
|
- //AijiaThreadPool.getInstance().submit(new SyncSaveExerciseQuestionsTask(kmtExerciseMapper, exerciseQuestionSearchService, Collections.singletonList(kmtExerciseQuestion.getId())));
|
|
|
- }
|
|
|
- }
|
|
|
+// if (request.getEnumerate()==1){
|
|
|
+// String path = this.removeQuestionNumMark(request.getStartX(), request.getStartY(), request.getEndX(), request.getEndY(), kmtExerciseQuestion.getImage());
|
|
|
+// String content = JSONFileUtil.readJSONFile(PropertiesUtil.getValue("EXERCISE_JSON_FILE_PATH") + kmtExerciseQuestion.getQuestionPath());
|
|
|
+// if (StringUtil.isNotBlank(content) && StringUtil.isNotBlank(path)) {
|
|
|
+// Map<String, Object> map = JSON.parseObject(content, Map.class);
|
|
|
+// ExerciseQuestionAnswerValue questionAnswerValue = ExerciseUtil.getExerciseQuestionAnswerValue(path);
|
|
|
+// if (questionAnswerValue == null){
|
|
|
+// map.put("question_json", "[]");
|
|
|
+// } else {
|
|
|
+// map.put("question_json", Collections.singletonList(questionAnswerValue));
|
|
|
+// }
|
|
|
+// map.put("question", "<img src='" + PropertiesUtil.getValue("STATIC_FILE_URL") + path + "'/>");
|
|
|
+// map.put("userId",userId);
|
|
|
+// map.put("questionPath",path);
|
|
|
+// map.put("bookId",kmtExerciseQuestion.getBookId());
|
|
|
+// //JSONFileUtil.saveJSONFile(PropertiesUtil.getValue("EXERCISE_JSON_FILE_PATH") + kmtExerciseQuestion.getQuestionPath(), JSON.toJSONString(map));
|
|
|
+// questionInfoService.updateQuestionAndJsonByQuestionId(kmtExerciseQuestion.getId(), map);
|
|
|
+// //AijiaThreadPool.getInstance().submit(new SyncSaveExerciseQuestionsTask(kmtExerciseMapper, exerciseQuestionSearchService, Collections.singletonList(kmtExerciseQuestion.getId())));
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
return responseEntity.success("成功");
|
|
|
}
|