ソースを参照

去掉曲目分类

zouxuan 7 ヶ月 前
コミット
110f776ef3

+ 1 - 4
mec-application/src/main/java/com/ym/mec/student/controller/LessonCoursewareController.java

@@ -72,10 +72,7 @@ public class LessonCoursewareController extends BaseController {
 	@ApiOperation(value = "获取课程详情")
 	@GetMapping("/getLessonCourseDetail/{id}")
 	public HttpResponseResult<CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail> getLessonCourseDetail(@PathVariable("id") Long id){
-		SysUser sysUser = sysUserService.getUser();
-		String teachingMaterialIds = organizationService.getTeachingMaterialIds(sysUser.getOrganId().toString(),sysUser.getTenantId());
-		List<Integer> categoryIdList = cbsMusicScoreCategoriesService.getAllCategoryIdList(teachingMaterialIds);
-		return succeed(lessonCoursewareService.getLessonCourseDetail(id,categoryIdList));
+		return succeed(lessonCoursewareService.getLessonCourseDetail(id));
 	}
 
 	@ApiOperation(value = "获取课件关联的声部列表")

+ 1 - 4
mec-application/src/main/java/com/ym/mec/teacher/controller/LessonCoursewareController.java

@@ -72,10 +72,7 @@ public class LessonCoursewareController extends BaseController {
 	@ApiOperation(value = "获取课程详情")
 	@GetMapping("/getLessonCourseDetail/{id}")
 	public HttpResponseResult<CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail> getLessonCourseDetail(@PathVariable("id") Long id){
-		SysUser sysUser = sysUserService.getUser();
-		String teachingMaterialIds = organizationService.getTeachingMaterialIds(sysUser.getOrganId().toString(),sysUser.getTenantId());
-		List<Integer> categoryIdList = cbsMusicScoreCategoriesService.getAllCategoryIdList(teachingMaterialIds);
-		return succeed(lessonCoursewareService.getLessonCourseDetail(id,categoryIdList));
+		return succeed(lessonCoursewareService.getLessonCourseDetail(id));
 	}
 
 	@ApiOperation(value = "获取课件关联的声部列表")

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/LessonCoursewareService.java

@@ -22,6 +22,6 @@ public interface LessonCoursewareService extends IService<LessonCourseware> {
     //获取课件适用范围
     LessonCoursewareWrapper.UpdateRangeDetail getRangeType(Integer lessonCoursewareId);
 
-    CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail getLessonCourseDetail(Long id, List<Integer> categoryIdList);
+    CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail getLessonCourseDetail(Long id);
 }
 

+ 8 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/LessonCoursewareServiceImpl.java

@@ -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());
                             }
                         }