|
|
@@ -84,6 +84,12 @@ public class StudyBookServiceImpl implements StudyBookService {
|
|
|
.eq(QuizChapter::getSubjectId, subjectId)
|
|
|
.orderByAsc(QuizChapter::getSort)
|
|
|
);
|
|
|
+ // 后台在"科目"下新增的章 parentId=科目ID;树构建以 0 为根,统一归一化
|
|
|
+ for (QuizChapter ch : chapters) {
|
|
|
+ if (subjectId.equals(ch.getParentId())) {
|
|
|
+ ch.setParentId(0L);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 实时查询各考点题目数
|
|
|
Map<Long, Integer> directCountMap = getDirectQuestionCounts();
|