|
|
|
@ -107,6 +107,9 @@ public class ObjectiveContentKnowServiceImpl extends ServiceImpl<ObjectiveConten |
|
|
|
|
new LambdaQueryWrapper<ObjectiveContentKnow>() |
|
|
|
|
.eq(ObjectiveContentKnow::getObjectiveContentId, objectiveContentId) |
|
|
|
|
); |
|
|
|
|
if(objectiveContentKnows.isEmpty()){ |
|
|
|
|
throw new BusinessException(ErrorCode.CONTENT_HAS_NO_KNOWS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 创建并设置ObjectiveContentKnowVO对象的属性
|
|
|
|
|
objectiveContentKnowVO = createObjectiveContentKnowVO(objectiveContentId, objectiveContentKnows); |
|
|
|
@ -120,6 +123,7 @@ public class ObjectiveContentKnowServiceImpl extends ServiceImpl<ObjectiveConten |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 创建ObjectiveContentKnowVO对象,并计算知识点数量、总时间和关联的知识点部分数据
|
|
|
|
|
// TODO 查询知识点的数据 有优化空间!!!
|
|
|
|
|
private ObjectiveContentKnowVO createObjectiveContentKnowVO(String objectiveOrContentId, List<ObjectiveContentKnow> objectiveContentKnows) { |
|
|
|
|
ObjectiveContentKnowVO vo = new ObjectiveContentKnowVO(); |
|
|
|
|
vo.setObjectiveOrContent(objectiveOrContentId); |
|
|
|
|