|
|
|
@ -340,9 +340,9 @@ public class YunXiao {
|
|
|
|
|
.set("subject_id", subjectCode)
|
|
|
|
|
.set("stage_id", key)
|
|
|
|
|
//增加学习次数
|
|
|
|
|
.set("previewCount", jsonSource.getIntValue("previewCount"))
|
|
|
|
|
.set("learningPersonCount", jsonSource.getIntValue("learningPersonCount"))
|
|
|
|
|
.set("learningPersonTimes", jsonSource.getIntValue("learningPersonTimes"))
|
|
|
|
|
.set("preview_count", jsonSource.getIntValue("previewCount"))
|
|
|
|
|
.set("learning_person_count", jsonSource.getIntValue("learningPersonCount"))
|
|
|
|
|
.set("learning_person_times", jsonSource.getIntValue("learningPersonTimes"))
|
|
|
|
|
.set("id", UUID.randomUUID().toString());
|
|
|
|
|
lessonList.add(record);
|
|
|
|
|
int count = resourceCount.incrementAndGet();
|
|
|
|
@ -435,12 +435,6 @@ public class YunXiao {
|
|
|
|
|
}
|
|
|
|
|
arp.start();
|
|
|
|
|
|
|
|
|
|
// 清空表
|
|
|
|
|
String[] tables = {"t_crawler_subject", "t_crawler_scheme", "t_crawler_book",
|
|
|
|
|
"t_crawler_structure", "t_crawler_lesson"};
|
|
|
|
|
for (String table : tables) {
|
|
|
|
|
Db.update("truncate table " + table);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
|
|
map.put("1", "学前");
|
|
|
|
@ -504,6 +498,13 @@ public class YunXiao {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
executorService.shutdown();
|
|
|
|
|
|
|
|
|
|
// 清空表
|
|
|
|
|
String[] tables = {"t_crawler_subject", "t_crawler_scheme", "t_crawler_book",
|
|
|
|
|
"t_crawler_structure", "t_crawler_lesson"};
|
|
|
|
|
for (String table : tables) {
|
|
|
|
|
Db.update("truncate table " + table);
|
|
|
|
|
}
|
|
|
|
|
// 保存数据
|
|
|
|
|
print("开始保存数据...");
|
|
|
|
|
Db.batchSave("t_crawler_subject", subjectList, batchSize);
|
|
|
|
|