|
@@ -40,7 +40,7 @@ public class BokUtil {
|
|
|
this.restRequestUtil = restRequestUtil;
|
|
this.restRequestUtil = restRequestUtil;
|
|
|
this.cacheUtils = cacheUtils;
|
|
this.cacheUtils = cacheUtils;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public void bokFindByStemLike(String stem, List<BaseQuestionVO> questions, Map page, Pageable pageable) {
|
|
public void bokFindByStemLike(String stem, List<BaseQuestionVO> questions, Map page, Pageable pageable) {
|
|
|
Map<String, String> urlParams = new HashMap<>();
|
|
Map<String, String> urlParams = new HashMap<>();
|
|
|
urlParams.put("content", stem);
|
|
urlParams.put("content", stem);
|
|
@@ -101,6 +101,7 @@ public class BokUtil {
|
|
|
List<BaseQuestionVO> collect = parseBody(tqs);
|
|
List<BaseQuestionVO> collect = parseBody(tqs);
|
|
|
Map<String, Object> newGet = new HashMap<>(collect.size());
|
|
Map<String, Object> newGet = new HashMap<>(collect.size());
|
|
|
for (BaseQuestionVO vo : collect) {
|
|
for (BaseQuestionVO vo : collect) {
|
|
|
|
|
+ System.out.println(vo);
|
|
|
questionsMap.put(vo.getQuestionId(), vo);
|
|
questionsMap.put(vo.getQuestionId(), vo);
|
|
|
newGet.put(vo.getQuestionId(), vo);
|
|
newGet.put(vo.getQuestionId(), vo);
|
|
|
}
|
|
}
|
|
@@ -125,12 +126,12 @@ public class BokUtil {
|
|
|
case "choice":
|
|
case "choice":
|
|
|
return ChoiceQuestionVO.builder().stem((String) q.get("stem")).kind(QuestionKindState.CHOICE)
|
|
return ChoiceQuestionVO.builder().stem((String) q.get("stem")).kind(QuestionKindState.CHOICE)
|
|
|
.options((Map<String, String>) q.get("options")).answer(((String) q.get("answer")).replaceAll("【答案】", ""))
|
|
.options((Map<String, String>) q.get("options")).answer(((String) q.get("answer")).replaceAll("【答案】", ""))
|
|
|
- .analysis((String) q.get("analysis")).questionId(String.valueOf((Integer) q.get("tqId"))).build();
|
|
|
|
|
|
|
+ .analysis((String) q.get("analysis")).questionId(String.valueOf((Integer) q.get("tq_id"))).build();
|
|
|
|
|
|
|
|
case "true_false":
|
|
case "true_false":
|
|
|
return TrueOrFalseQuestionVO.builder().stem((String) q.get("stem")).kind(QuestionKindState.TRUE_FALSE)
|
|
return TrueOrFalseQuestionVO.builder().stem((String) q.get("stem")).kind(QuestionKindState.TRUE_FALSE)
|
|
|
.answer(Boolean.valueOf((String) q.get("answer")))
|
|
.answer(Boolean.valueOf((String) q.get("answer")))
|
|
|
- .analysis((String) q.get("analysis")).questionId(String.valueOf((Integer) q.get("tqId"))).build();
|
|
|
|
|
|
|
+ .analysis((String) q.get("analysis")).questionId(String.valueOf((Integer) q.get("tq_id"))).build();
|
|
|
default:
|
|
default:
|
|
|
}
|
|
}
|
|
|
throw HelperException.of(ExceptionType.ERROR, "unknown type:" + (String) q.get("type"));
|
|
throw HelperException.of(ExceptionType.ERROR, "unknown type:" + (String) q.get("type"));
|