|
@@ -96,8 +96,13 @@ public class ExamPaperServiceImpl implements ExamPaperService {
|
|
|
labaryidList.add(UUID.randomUUID().toString());
|
|
|
List<Map<String, Object>> list = this.testExamPaperCQuery.selectTakeQuestions(labaryidList, typeList, difficultyList);
|
|
|
list.forEach(x -> {
|
|
|
-
|
|
|
- x.put("ANSWERS", JSON.parseObject(JSON.toJSONString(JSON.parse(x.get("ANSWERS").toString())), List.class));
|
|
|
+ Clob clob = (Clob) x.get("ANSWERS");
|
|
|
+ String clobString = null;
|
|
|
+ try {
|
|
|
+ clobString = clob.getSubString(1, (int) clob.length());
|
|
|
+ } catch (SQLException e) { }
|
|
|
+ List answers = JSON.parseObject(clobString, List.class);
|
|
|
+ x.put("ANSWERS", answers);
|
|
|
});
|
|
|
return list;
|
|
|
}
|
|
@@ -230,7 +235,13 @@ public class ExamPaperServiceImpl implements ExamPaperService {
|
|
|
|
|
|
List<Map<String, Object>> list = this.testExamPaperCQuery.selectPaparQuestionList(paperid);
|
|
|
list.forEach(x -> {
|
|
|
- x.put("ANSWERS", JSON.parseObject(JSON.toJSONString(JSON.parse(x.get("ANSWERS").toString())), List.class));
|
|
|
+ Clob clob = (Clob) x.get("ANSWERS");
|
|
|
+ String clobString = null;
|
|
|
+ try {
|
|
|
+ clobString = clob.getSubString(1, (int) clob.length());
|
|
|
+ } catch (SQLException e) { }
|
|
|
+ List answers = JSON.parseObject(clobString, List.class);
|
|
|
+ x.put("ANSWERS", answers);
|
|
|
});
|
|
|
return list;
|
|
|
}
|