|
|
|
@ -14,7 +14,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
|
|
|
|
public class YunXiaoKnowledge {
|
|
|
|
|
public class KnowledgeLesson {
|
|
|
|
|
// 用于存储课程信息的线程安全列表
|
|
|
|
|
public static List<Record> lessonList = Collections.synchronizedList(new ArrayList<>());
|
|
|
|
|
public static int batchSize = 100;
|
|
|
|
@ -108,7 +108,7 @@ public class YunXiaoKnowledge {
|
|
|
|
|
argBook.put("sortType", 2);
|
|
|
|
|
argBook.put("stageCode", stageCode);
|
|
|
|
|
argBook.put("subjectCode", subjectCode);
|
|
|
|
|
String respBook = YunXiaoBook.doRequestWithRetry(url, argBook.toString(), false, 3);
|
|
|
|
|
String respBook = BookLesson.doRequestWithRetry(url, argBook.toString(), false, 3);
|
|
|
|
|
|
|
|
|
|
if (respBook != null) {
|
|
|
|
|
JSONArray jsonArrSource = JSONObject.parseObject(respBook)
|
|
|
|
@ -204,7 +204,7 @@ public class YunXiaoKnowledge {
|
|
|
|
|
subjectCode, subjectMap.get(subjectCode));
|
|
|
|
|
String url = "https://yx.ccsjy.cn/api/business/v1/knowledge/tree";
|
|
|
|
|
|
|
|
|
|
String respBook = YunXiaoBook.doRequestWithRetry(url, argBook.toString(), false, 3);
|
|
|
|
|
String respBook = BookLesson.doRequestWithRetry(url, argBook.toString(), false, 3);
|
|
|
|
|
if (respBook != null) {
|
|
|
|
|
try {
|
|
|
|
|
List<Record> allRecords = new ArrayList<>();
|