|
@@ -191,39 +191,38 @@ public class LessonCoursewareServiceImpl extends ServiceImpl<LessonCoursewareMap
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail getLessonCourseDetail(Long id,List<Integer> categoryIdList) {
|
|
|
+ public CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail getLessonCourseDetail(Long id) {
|
|
|
CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail detail = coursewareFeignService.lessonCoursewareDetailDetail(id).feignData();
|
|
|
if (detail == null) {
|
|
|
return null;
|
|
|
}
|
|
|
//获取知识点下的素材列表、下面关联的资源列表,如果applicationIdList是空的,那么把他剔除掉
|
|
|
- this.setTreeResourceId(detail.getKnowledgePointList(),categoryIdList);
|
|
|
+ this.setTreeResourceId(detail.getKnowledgePointList());
|
|
|
return detail;
|
|
|
}
|
|
|
|
|
|
//递归处理CbsLessonCoursewareDetailWrapper.KnowledgePointSmall
|
|
|
- private void setTreeResourceId(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList,List<Integer> categoryIdList){
|
|
|
+ private void setTreeResourceId(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList){
|
|
|
if(CollectionUtils.isNotEmpty(knowledgePointList)){
|
|
|
knowledgePointList.forEach(knowledgePointSmall -> {
|
|
|
- this.setResourceId(knowledgePointSmall,categoryIdList);
|
|
|
+ this.setResourceId(knowledgePointSmall);
|
|
|
List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> children = knowledgePointSmall.getChildren();
|
|
|
if(CollectionUtils.isNotEmpty(children)){
|
|
|
- this.setTreeResourceId(children,categoryIdList);
|
|
|
+ this.setTreeResourceId(children);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void setResourceId(CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall,List<Integer> categoryIdList){
|
|
|
+ private void setResourceId(CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall){
|
|
|
List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList = knowledgePointSmall.getMaterialList();
|
|
|
if(CollectionUtils.isNotEmpty(materialList)){
|
|
|
for (CbsLessonCoursewareDetailWrapper.MaterialSmall materialSmall : materialList) {
|
|
|
if(materialSmall.getType() == EMaterialType.SONG){
|
|
|
SysMusicScore musicScore = sysMusicScoreService.getDao().getCbsId(Long.parseLong(materialSmall.getContent()));
|
|
|
//没有启用的曲目不显示
|
|
|
- if(musicScore != null && musicScore.getShowFlag() == 1 && musicScore.getClientShowFlag() == 1
|
|
|
- && categoryIdList.contains(musicScore.getCbsMusicCategoriesId())) {
|
|
|
+ if(musicScore != null && musicScore.getShowFlag() == 1 && musicScore.getClientShowFlag() == 1) {
|
|
|
materialSmall.setContent(musicScore.getId().toString());
|
|
|
}else {
|
|
|
materialSmall.setContent(null);
|
|
@@ -237,8 +236,7 @@ public class LessonCoursewareServiceImpl extends ServiceImpl<LessonCoursewareMap
|
|
|
if(relateMaterialInfo != null && StringUtils.equals(relateMaterialInfo.getType(),"SONG")
|
|
|
&& CollectionUtils.isNotEmpty(relateMaterialInfo.getApplicationIdList())){
|
|
|
SysMusicScore musicScore = sysMusicScoreService.getDao().getCbsId(relateMaterialInfo.getId());
|
|
|
- if(musicScore != null && musicScore.getShowFlag() == 1 && musicScore.getClientShowFlag() == 1
|
|
|
- && categoryIdList.contains(musicScore.getCbsMusicCategoriesId())) {
|
|
|
+ if(musicScore != null && musicScore.getShowFlag() == 1 && musicScore.getClientShowFlag() == 1) {
|
|
|
materialRef.setResourceIdStr(musicScore.getId().toString());
|
|
|
}
|
|
|
}
|