Browse Source

Merge branch 'zx_online_update_1218' of http://git.dayaedu.com/yonge/cooleshow into zx_online_update_1218

刘俊驰 1 week ago
parent
commit
a9bec6f7eb
45 changed files with 798 additions and 553 deletions
  1. 2 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/MusicPracticeRecordController.java
  2. 10 8
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetCbsController.java
  3. 17 7
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/TenantAlbumSheetController.java
  4. 2 78
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/open/OpenMusicSheetCbsController.java
  5. 2 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/MusicPracticeRecordController.java
  6. 18 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/MusicSheetCbsController.java
  7. 17 17
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/TenantAlbumSheetController.java
  8. 3 81
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/open/OpenMusicSheetCbsController.java
  9. 2 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicPracticeRecordController.java
  10. 19 6
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicSheetCbsController.java
  11. 0 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicSheetController.java
  12. 7 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java
  13. 24 50
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TenantAlbumSheetController.java
  14. 2 75
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/open/OpenMusicSheetCbsController.java
  15. 14 7
      cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/TenantAlbumSheetController.java
  16. 5 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/website/controller/CourseGroupController.java
  17. 10 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/CourseCoursewareSearch.java
  18. 4 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java
  19. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/mapper/TenantAlbumMusicMapper.java
  20. 10 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/MusicSheetService.java
  21. 12 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TenantAlbumMusicService.java
  22. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/UserOrderService.java
  23. 15 4
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseCoursewareServiceImpl.java
  24. 3 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java
  25. 173 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/MusicSheetServiceImpl.java
  26. 7 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PaymentDivMemberRecordServiceImpl.java
  27. 7 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java
  28. 193 4
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumMusicServiceImpl.java
  29. 9 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderServiceImpl.java
  30. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseGroupVo.java
  31. 5 71
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseRepliedVo.java
  32. 0 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseInfoVo.java
  33. 4 119
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyRepliedVo.java
  34. 4 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherHomeVo.java
  35. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherLiveCourseInfoVo.java
  36. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/LessonCoursewareWrapper.java
  37. 112 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/MusicSheetWrapper.java
  38. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantAlbumMusicWrapper.java
  39. 1 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseCoursewareMapper.xml
  40. 6 3
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  41. 1 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  42. 2 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRepliedMapper.xml
  43. 4 3
      cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml
  44. 37 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantAlbumMusicMapper.xml
  45. 1 1
      pom.xml

+ 2 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/MusicPracticeRecordController.java

@@ -51,7 +51,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -76,7 +76,7 @@ public class MusicPracticeRecordController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new com.yonge.toolset.base.exception.BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         if (cbsMusicSheet != null) {
             from.setRhythmFlag(cbsMusicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 10 - 8
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetCbsController.java

@@ -82,7 +82,7 @@ public class MusicSheetCbsController extends BaseController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetailAuth/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetailAuth(@PathVariable("id") String id) {
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetailAuth(@PathVariable("id") String id,Boolean simpleFlag) {
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = null;
         MusicSheetDetailVo detail = musicSheetDao.detail(Long.parseLong(id));
@@ -111,7 +111,7 @@ public class MusicSheetCbsController extends BaseController {
         if (musicSheetDetail == null) {
             detail = musicSheetService.getCbsDetail(Long.parseLong(id),SourceTypeEnum.PLATFORM);
 
-            CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(detail.getCbsMusicSheetId());
+            CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(detail.getCbsMusicSheetId(), simpleFlag);
             cbsMusicSheet.setBizId(Long.parseLong(id));
             musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);
         }
@@ -164,7 +164,7 @@ public class MusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId,
                                                       @RequestParam(required = false) String providerType) {
 
@@ -180,14 +180,16 @@ public class MusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
         // 设置查询机构 还是平台数据
-        if (StringUtils.isNotBlank(providerType) && SourceTypeEnum.PLATFORM.name().equals(providerType)) {
-            tenantAlbumId = null;
-        } else {
-            tenantAlbumId = StringUtils.isBlank(tenantAlbumId) ? null : "1";
+        if (StringUtils.isBlank(tenantAlbumId) && StringUtils.isNotBlank(providerType)) {
+            if (SourceTypeEnum.PLATFORM.name().equals(providerType)) {
+                tenantAlbumId = null;
+            } else {
+                tenantAlbumId = "1";
+            }
         }
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 17 - 7
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/TenantAlbumSheetController.java

@@ -16,10 +16,10 @@ import com.yonge.toolset.base.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,13 +35,13 @@ import java.util.List;
 @Api(tags = "机构专辑曲目 API接口")
 public class TenantAlbumSheetController extends BaseController {
 
-    @Autowired
+    @Resource
     private CoursewareFeignService coursewareFeignService;
 
-    @Autowired
+    @Resource
     private TenantAlbumMusicService tenantAlbumMusicService;
 
-    @Autowired
+    @Resource
     private SysUserFeignService sysUserFeignService;
 
 
@@ -67,9 +67,19 @@ public class TenantAlbumSheetController extends BaseController {
 
     @ApiOperation(value = "获取课件关联的课程列表")
     @GetMapping("/getLessonCoursewareCourseList/{id}")
-    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id){
-        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(id).feignData();
+    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id,
+                                                                                                                          String search,
+                                                                                                                          Boolean detailFlag){
+        CbsLessonCoursewareWrapper.CoursewareDetailQuery query = new CbsLessonCoursewareWrapper.CoursewareDetailQuery();
+        query.setId(id);
+        query.setSearch(search);
+        query.setDetailFlag(detailFlag);
+        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(query).feignData();
         if (CollectionUtils.isNotEmpty(courseScheduleCoursewareDetails)) {
+            //过滤酷乐秀相关的权限
+            courseScheduleCoursewareDetails.forEach(tenantAlbumMusicService::filterLessonCourseDetail);
+            //剔除空数据
+            courseScheduleCoursewareDetails.removeIf(e->!tenantAlbumMusicService.filterAndUpdateKnowledgePointList(e));
             String jsonString = JSONObject.toJSONString(courseScheduleCoursewareDetails);
             List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetailList = JSONObject.parseArray(jsonString, LessonCoursewareWrapper.CourseScheduleCoursewareDetail.class);
             return succeed(courseScheduleCoursewareDetailList);

+ 2 - 78
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/open/OpenMusicSheetCbsController.java

@@ -1,38 +1,21 @@
 package com.yonge.cooleshow.admin.controller.open;
 
 import com.alibaba.fastjson.JSON;
-import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
-import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
-import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
-import com.yonge.cooleshow.biz.dal.entity.UserMusic;
-import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
-import com.yonge.cooleshow.biz.dal.service.InstrumentService;
 import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
-import com.yonge.cooleshow.biz.dal.service.UserMusicService;
-import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
 import com.yonge.cooleshow.biz.dal.vo.MusicSheetVo;
-import com.yonge.cooleshow.biz.dal.wrapper.InstrumentWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
-import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import com.yonge.toolset.base.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
 import java.util.Objects;
-import java.util.stream.Collectors;
 
 /**
  * 曲谱表 web 控制层
@@ -44,19 +27,9 @@ import java.util.stream.Collectors;
 @RequestMapping("${app-config.url.admin:}/open/musicSheet")
 @Api(tags = "曲谱表 API接口")
 public class OpenMusicSheetCbsController extends BaseController {
-    @Resource
-    private SysUserFeignService sysUserFeignService;
-
 	@Resource
 	private MusicSheetService musicSheetService;
 
-
-    @Autowired
-    private InstrumentService instrumentService;
-
-    @Autowired
-    private UserMusicService userMusicService;
-
     /**
      * 查询单条
      *
@@ -68,7 +41,7 @@ public class OpenMusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId,
                                                       @RequestParam(required = false) Long userMusicId) {
 
@@ -80,59 +53,10 @@ public class OpenMusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);
-//
-//
-//        MusicSheetDetailVo detail;
-//        if (userMusicId != null) {
-//            UserMusic userMusic = userMusicService.detail(userMusicId);
-//            if (userMusic == null) {
-//                throw new BizException("参数错误");
-//            } else {
-//                SysUser sysUser = sysUserFeignService.queryUserById(userMusic.getUserId());
-//                detail = musicSheetService.detail(id.toString(), sysUser, ClientEnum.SYSTEM, tenantAlbumId);
-//            }
-//        } else {
-//
-//            detail = musicSheetService.detail(id.toString(), null, ClientEnum.SYSTEM, tenantAlbumId);
-//        }
-//        if (detail != null) {
-//            // 设置曲目付费类型
-//            musicSheetDetail.setPaymentType(detail.getPaymentType());
-//            // 设置业务端曲目分类
-////            musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
-//            musicSheetDetail.setScoreType(detail.getScoreType());
-//            musicSheetDetail.setIsConvertibleScore(detail.getNotation() ==YesOrNoEnum.YES);
-//            musicSheetDetail.setPlay(detail.getPlay());
-//            musicSheetDetail.setBuyed(detail.getBuyed());
-//            musicSheetDetail.setMusicPrice(detail.getMusicPrice());
-//        }
-//
-//        // 如果是合奏 并且乐器ID = 2268
-//        musicSheetDetail.setSpecialPercussionFlag(false);
-//        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
-//            musicSheetDetail.setSpecialPercussionFlag(true);
-//        }
-//
-//        // 设置乐器信息
-//        if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
-//            List<Long> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))
-//                .map(Long::parseLong).collect(Collectors.toList());
-//
-//            if (CollectionUtils.isNotEmpty(instrumentIds) && CollectionUtils.isNotEmpty(musicSheetDetail.getMusicalInstruments())) {
-//                Map<Long, InstrumentWrapper.Instrument> instrumentMap = instrumentService.getMapByIds(instrumentIds);
-//                for (CbsMusicSheetWrapper.MusicalInstrument musicalInstrument : musicSheetDetail.getMusicalInstruments()) {
-//                    InstrumentWrapper.Instrument instrument = instrumentMap.get(musicalInstrument.getId().longValue());
-//                    if (instrument != null) {
-//                        musicalInstrument.setOrientation(instrument.getOrientation());
-//                    }
-//
-//                }
-//            }
-//        }
         return R.from(musicSheetDetail);
     }
 

+ 2 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/MusicPracticeRecordController.java

@@ -56,7 +56,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -81,7 +81,7 @@ public class MusicPracticeRecordController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new com.yonge.toolset.base.exception.BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         if (cbsMusicSheet != null) {
             from.setRhythmFlag(cbsMusicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 18 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/MusicSheetCbsController.java

@@ -69,7 +69,7 @@ public class MusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId) {
 
         SysUser sysUser = sysUserService.getUser();
@@ -81,7 +81,7 @@ public class MusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);
@@ -181,4 +181,20 @@ public class MusicSheetCbsController extends BaseController {
         IPage<MusicSheetWrapper.MusicSheetCloud> musicSheetCloudIPage = musicSheetService.cloudPage(query);
         return HttpResponseResult.succeed(PageUtil.pageInfo(musicSheetCloudIPage));
     }
+
+
+    /**
+     * 查询单条
+     */
+    @PostMapping("/detailSmall")
+    @ApiOperation(value = "详情")
+    public HttpResponseResult<MusicSheetWrapper.MusicSheetDetail> detailSmall(@RequestBody MusicSheetWrapper.MusicSheetDetailQuery query) {
+
+        SysUser sysUser = sysUserService.getUser();
+        query.setClient(ClientEnum.STUDENT);
+
+
+        return succeed(musicSheetService.detailSmall(query,sysUser));
+    }
+
 }

+ 17 - 17
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/TenantAlbumSheetController.java

@@ -2,18 +2,13 @@ package com.yonge.cooleshow.student.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.dayaedu.cbs.common.enums.school.EKnowledgeType;
 import com.dayaedu.cbs.openfeign.client.CoursewareFeignService;
-import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
-import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsMaterialRefWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
-import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
 import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
-import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
 import com.yonge.cooleshow.biz.dal.service.StudentService;
 import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
 import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareDetailWrapper;
@@ -28,16 +23,15 @@ import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.http.HttpStatus;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
 
 /**
  * 专辑表 web 控制层
@@ -50,21 +44,18 @@ import java.util.stream.Collectors;
 @Api(tags = "机构专辑曲目 API接口")
 public class TenantAlbumSheetController extends BaseController {
 
-    @Autowired
+    @Resource
     private TenantAlbumMusicService tenantAlbumMusicService;
 
-    @Autowired
+    @Resource
     private SysUserFeignService sysUserFeignService;
 
-    @Autowired
+    @Resource
     private StudentService studentService;
 
-    @Autowired
+    @Resource
     private CoursewareFeignService coursewareFeignService;
 
-    @Autowired
-    private MusicSheetService musicSheetService;
-
     @ApiOperation(value = "查询条件")
     @PostMapping("/selectCondition")
     public HttpResponseResult<TenantAlbumMusicWrapper.TenantAlbumMusicSelectData> selectCondition(@RequestBody TenantAlbumMusicWrapper.TenantAlbumMusicSelect query) {
@@ -125,9 +116,18 @@ public class TenantAlbumSheetController extends BaseController {
 
     @ApiOperation(value = "获取课件关联的课程列表")
     @GetMapping("/getLessonCoursewareCourseList/{id}")
-    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id){
-        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(id).feignData();
+    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id,
+                                                                                                                          String search,
+                                                                                                                          Boolean detailFlag){
+        CbsLessonCoursewareWrapper.CoursewareDetailQuery query = new CbsLessonCoursewareWrapper.CoursewareDetailQuery();
+        query.setId(id);
+        query.setSearch(search);
+        query.setDetailFlag(detailFlag);
+        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(query).feignData();
         if (CollectionUtils.isNotEmpty(courseScheduleCoursewareDetails)) {
+            //过滤酷乐秀相关的权限
+            courseScheduleCoursewareDetails.forEach(tenantAlbumMusicService::filterLessonCourseDetail);
+            courseScheduleCoursewareDetails.removeIf(e->!tenantAlbumMusicService.filterAndUpdateKnowledgePointList(e));
             String jsonString = JSONObject.toJSONString(courseScheduleCoursewareDetails);
             List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetailList = JSONObject
                 .parseArray(jsonString, LessonCoursewareWrapper.CourseScheduleCoursewareDetail.class);

+ 3 - 81
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/open/OpenMusicSheetCbsController.java

@@ -1,43 +1,21 @@
 package com.yonge.cooleshow.student.controller.open;
 
 import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
-import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
-import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
-import com.yonge.cooleshow.biz.dal.entity.Student;
-import com.yonge.cooleshow.biz.dal.entity.UserMusic;
-import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
-import com.yonge.cooleshow.biz.dal.enums.SourceTypeEnum;
-import com.yonge.cooleshow.biz.dal.service.*;
-import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
+import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
 import com.yonge.cooleshow.biz.dal.vo.MusicSheetVo;
-import com.yonge.cooleshow.biz.dal.wrapper.InstrumentWrapper;
-import com.yonge.cooleshow.biz.dal.wrapper.MusicSheetWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
-import com.yonge.cooleshow.common.entity.HttpResponseResult;
-import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import com.yonge.toolset.base.exception.BizException;
-import com.yonge.toolset.base.page.PageInfo;
-import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
 import java.util.Objects;
-import java.util.stream.Collectors;
 
 /**
  * 曲谱表 web 控制层
@@ -49,19 +27,10 @@ import java.util.stream.Collectors;
 @RequestMapping("${app-config.url.student:}/open/musicSheet")
 @Api(tags = "曲谱表 API接口")
 public class OpenMusicSheetCbsController extends BaseController {
-    @Resource
-    private SysUserFeignService sysUserFeignService;
 
 	@Resource
 	private MusicSheetService musicSheetService;
 
-
-    @Autowired
-    private InstrumentService instrumentService;
-
-    @Autowired
-    private UserMusicService userMusicService;
-
     /**
      * 查询单条
      *
@@ -73,7 +42,7 @@ public class OpenMusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId,
                                                       @RequestParam(required = false) Long userMusicId) {
 
@@ -85,57 +54,10 @@ public class OpenMusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);
-//        MusicSheetDetailVo detail;
-//        if (userMusicId != null) {
-//            UserMusic userMusic = userMusicService.detail(userMusicId);
-//            if (userMusic == null) {
-//                throw new BizException("参数错误");
-//            } else {
-//                SysUser sysUser = sysUserFeignService.queryUserById(userMusic.getUserId());
-//                detail = musicSheetService.detail(id.toString(), sysUser, ClientEnum.STUDENT, tenantAlbumId);
-//            }
-//        } else {
-//
-//            detail = musicSheetService.detail(id.toString(), null, ClientEnum.STUDENT, tenantAlbumId);
-//        }
-//        if (detail != null) {
-//            // 设置曲目付费类型
-//            musicSheetDetail.setPaymentType(detail.getPaymentType());
-//            // 设置业务端曲目分类
-////            musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
-//            musicSheetDetail.setScoreType(detail.getScoreType());
-//            musicSheetDetail.setIsConvertibleScore(detail.getNotation() ==YesOrNoEnum.YES);
-//            musicSheetDetail.setPlay(detail.getPlay());
-//            musicSheetDetail.setBuyed(detail.getBuyed());
-//            musicSheetDetail.setMusicPrice(detail.getMusicPrice());
-//        }
-//
-//        // 如果是合奏 并且乐器ID = 2268
-//        musicSheetDetail.setSpecialPercussionFlag(false);
-//        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
-//            musicSheetDetail.setSpecialPercussionFlag(true);
-//        }
-//
-//        // 设置乐器信息
-//        if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
-//            List<Long> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))
-//                .map(Long::parseLong).collect(Collectors.toList());
-//
-//            if (CollectionUtils.isNotEmpty(instrumentIds) && CollectionUtils.isNotEmpty(musicSheetDetail.getMusicalInstruments())) {
-//                Map<Long, InstrumentWrapper.Instrument> instrumentMap = instrumentService.getMapByIds(instrumentIds);
-//                for (CbsMusicSheetWrapper.MusicalInstrument musicalInstrument : musicSheetDetail.getMusicalInstruments()) {
-//                    InstrumentWrapper.Instrument instrument = instrumentMap.get(musicalInstrument.getId().longValue());
-//                    if (instrument != null) {
-//                        musicalInstrument.setOrientation(instrument.getOrientation());
-//                    }
-//
-//                }
-//            }
-//        }
         return R.from(musicSheetDetail);
     }
 

+ 2 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicPracticeRecordController.java

@@ -55,7 +55,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -80,7 +80,7 @@ public class MusicPracticeRecordController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new com.yonge.toolset.base.exception.BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         if (cbsMusicSheet != null) {
             from.setRhythmFlag(cbsMusicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 19 - 6
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicSheetCbsController.java

@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.validation.Valid;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -54,10 +55,6 @@ public class MusicSheetCbsController extends BaseController {
 	@Resource
 	private MusicSheetService musicSheetService;
     @Resource
-    private MusicFavoriteService musicFavoriteService;
-    @Resource
-    private CourseCoursewareService courseCoursewareService;
-    @Resource
     private AppVersionInfoService appVersionInfoService;
     @Resource
     private InstrumentService instrumentService;
@@ -77,7 +74,7 @@ public class MusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId,
                                                       @RequestParam(required = false) String providerType) {
 
@@ -90,7 +87,7 @@ public class MusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
 
@@ -191,4 +188,20 @@ public class MusicSheetCbsController extends BaseController {
         IPage<MusicSheetWrapper.MusicSheetCloud> musicSheetCloudIPage = musicSheetService.cloudPage(query);
         return HttpResponseResult.succeed(PageUtil.pageInfo(musicSheetCloudIPage));
     }
+
+
+
+    /**
+     * 查询单条
+     */
+    @PostMapping("/detailSmall")
+    @ApiOperation(value = "详情")
+    public HttpResponseResult<MusicSheetWrapper.MusicSheetDetail> detailSmall(@RequestBody MusicSheetWrapper.MusicSheetDetailQuery query) {
+
+        SysUser sysUser = sysUserService.getUser();
+        query.setClient(ClientEnum.TEACHER);
+
+
+        return succeed(musicSheetService.detailSmall(query,sysUser));
+    }
 }

+ 0 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/MusicSheetController.java

@@ -95,7 +95,6 @@ public class MusicSheetController extends BaseController {
         return succeed(detail);
     }
 
-
     @GetMapping("/detailUse/{id}")
     @ApiOperation(value = "是否可使用")
     public HttpResponseResult<MusicSheetWrapper.MusicUse> detailUse(@ApiParam(value = "曲谱编号", required = true) @PathVariable("id") String id,

+ 7 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java

@@ -3,6 +3,7 @@ package com.yonge.cooleshow.teacher.controller;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.biz.dal.dto.search.MyCourseSearch;
 import com.yonge.cooleshow.biz.dal.entity.CourseCalendarEntity;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
 import com.yonge.cooleshow.biz.dal.service.HolidaysFestivalsService;
 import com.yonge.cooleshow.biz.dal.service.SysUserService;
@@ -17,6 +18,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -50,12 +52,14 @@ public class TeacherCourseScheduleController extends BaseController {
             @ApiImplicitParam(name = "classDate", dataType = "Integer", value = "年月"),
             @ApiImplicitParam(name = "status", dataType = "String", value = "课程状态 NOT_START未开始 ING进行中 COMPLETE已完成"),
             @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "声部id"),
+            @ApiImplicitParam(name = "courseType", dataType = "String", value = "课程类型"),
             @ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),
             @ApiImplicitParam(name = "rows", dataType = "Integer", value = "每页数量"),
     })
     @ApiOperation("老师端-首页-我的课程-直播课")
     @PostMapping("/queryTeacherLiveCourse")
     public HttpResponseResult<PageInfo<TeacherLiveCourseInfoVo>> queryTeacherLiveCourse(@RequestBody Map<String, Object> param) {
+        param.put("type",param.get("courseType") == null? CourseScheduleEnum.LIVE.getCode():param.get("courseType").toString());
         return succeed(courseScheduleService.queryTeacherLiveCourse(param));
     }
 
@@ -100,7 +104,9 @@ public class TeacherCourseScheduleController extends BaseController {
     @PostMapping("/queryTeacherPracticeCourse")
     public HttpResponseResult<PageInfo<MyCourseVo>> queryTeacherPracticeCourse(@RequestBody MyCourseSearch search) {
         search.setTeacherId(sysUserService.getUserId());
-        search.setCourseType("VIP,PRACTICE,GROUP");
+        if(StringUtils.isEmpty(search.getCourseType())){
+            search.setCourseType("VIP,PRACTICE,GROUP");
+        }
         IPage<MyCourseVo> pages = courseScheduleService.queryTeacherPracticeCourse(PageUtil.getPage(search), search);
         return succeed(PageUtil.pageInfo(pages));
     }

+ 24 - 50
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TenantAlbumSheetController.java

@@ -5,14 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.dayaedu.cbs.openfeign.client.CoursewareFeignService;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
-import com.microsvc.toolkit.common.response.template.R;
-import com.microsvc.toolkit.config.jwt.utils.JwtUserInfo;
-import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
-import com.yonge.cooleshow.auth.api.entity.SysUser;
-import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
-import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
 import com.yonge.cooleshow.biz.dal.service.SysUserService;
 import com.yonge.cooleshow.biz.dal.service.TeacherService;
 import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
@@ -21,19 +15,13 @@ import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
-import com.yonge.toolset.base.exception.BizException;
 import com.yonge.toolset.base.page.PageInfo;
-import com.yonge.toolset.base.util.StringUtil;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
@@ -54,28 +42,17 @@ public class TenantAlbumSheetController extends BaseController {
 
     @Resource
     private TenantAlbumMusicService tenantAlbumMusicService;
-
     @Resource
     private SysUserService sysUserService;
-
     @Resource
     private CoursewareFeignService coursewareFeignService;
-
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
-
-    @Autowired
+    @Resource
     private TeacherService teacherService;
 
 
     @ApiOperation(value = "查询条件")
     @PostMapping("/selectCondition")
     public HttpResponseResult<TenantAlbumMusicWrapper.TenantAlbumMusicSelectData> selectCondition(@RequestBody TenantAlbumMusicWrapper.TenantAlbumMusicSelect query) {
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if (user == null || null == user.getId()) {
-            return failed(HttpStatus.FORBIDDEN, "请登录");
-        }
-//        query.setUserId(user.getId());
         return succeed(tenantAlbumMusicService.getTenantAlbumMusicQuery(query));
     }
 
@@ -83,16 +60,17 @@ public class TenantAlbumSheetController extends BaseController {
     @ApiOperation(value = "分页查询")
     @PostMapping("/page")
     public HttpResponseResult<PageInfo<TenantAlbumMusicWrapper.StudentTenantAlbumMusic>> page(@RequestBody @Validated TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if (user == null || null == user.getId()) {
-            return failed(HttpStatus.FORBIDDEN, "请登录");
-        }
+        query.setUserId(sysUserService.getUserId());
+        query.setClientType(ClientEnum.TEACHER);
+        return succeed((PageUtil.pageInfo(tenantAlbumMusicService.selectPage(QueryInfo.getPage(query), query))));
+    }
 
-//        Teacher teacher = teacherService.getById(user.getId());
-//        query.setTenantId(Optional.ofNullable(teacher.getTenantId()).orElse(-1L));
-        query.setUserId(user.getId());
+    @ApiOperation(value = "分页查询")
+    @PostMapping("/pageSimple")
+    public HttpResponseResult<PageInfo<TenantAlbumMusicWrapper.MusicSheetSimpleDto>> pageSimple(@RequestBody @Validated TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
+        query.setUserId(sysUserService.getUserId());
         query.setClientType(ClientEnum.TEACHER);
-        IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page = tenantAlbumMusicService.selectPage(QueryInfo.getPage(query), query);
+        IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> page = tenantAlbumMusicService.selectPageSimple(QueryInfo.getPage(query), query);
         return succeed((PageUtil.pageInfo(page)));
     }
 
@@ -101,21 +79,25 @@ public class TenantAlbumSheetController extends BaseController {
     @PostMapping("/getLessonCoursewareDetail")
     public HttpResponseResult<LessonCoursewareWrapper.LessonCourseware> getLessonCoursewareDetail(@RequestBody @Valid LessonCoursewareWrapper.LessonCourseQuery query){
         query.setClient(ClientEnum.TEACHER);
-//        SysUser sysUser = sysUserFeignService.queryUserInfo();
-//        if (sysUser == null || null == sysUser.getId()) {
-//            return failed("用户信息获取失败");
-//        }
         query.setUserId(sysUserService.getUserId());
-        LessonCoursewareWrapper.LessonCourseware lessonCourseware = tenantAlbumMusicService.getLessonCoursewareDetail(query);
-        return succeed(lessonCourseware);
+        return succeed(tenantAlbumMusicService.getLessonCoursewareDetail(query));
     }
 
 
     @ApiOperation(value = "获取课件关联的课程列表")
     @GetMapping("/getLessonCoursewareCourseList/{id}")
-    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id){
-        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(id).feignData();
+    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id,
+                                                                                                                          String search,
+                                                                                                                          Boolean detailFlag){
+        CbsLessonCoursewareWrapper.CoursewareDetailQuery query = new CbsLessonCoursewareWrapper.CoursewareDetailQuery();
+        query.setId(id);
+        query.setSearch(search);
+        query.setDetailFlag(detailFlag);
+        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(query).feignData();
         if (CollectionUtils.isNotEmpty(courseScheduleCoursewareDetails)) {
+            //过滤酷乐秀相关的权限
+            courseScheduleCoursewareDetails.forEach(tenantAlbumMusicService::filterLessonCourseDetail);
+            courseScheduleCoursewareDetails.removeIf(e->!tenantAlbumMusicService.filterAndUpdateKnowledgePointList(e));
             String jsonString = JSONObject.toJSONString(courseScheduleCoursewareDetails);
             List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetailList = JSONObject
                 .parseArray(jsonString, LessonCoursewareWrapper.CourseScheduleCoursewareDetail.class);
@@ -134,17 +116,9 @@ public class TenantAlbumSheetController extends BaseController {
     @ApiOperation(value = "关联课程类型")
     @PostMapping("/refLevel")
     public HttpResponseResult<List<LessonCoursewareDetailWrapper.RefLevelDetailInfo>> refLevel(@RequestBody LessonCoursewareDetailWrapper.RefLevelQuery query) {
-
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if (user == null || null == user.getId()) {
-            return failed(HttpStatus.FORBIDDEN, "请登录");
-        }
-
-        Teacher teacher = teacherService.getById(user.getId());
+        Teacher teacher = teacherService.getById(sysUserService.getUserId());
         query.setTenantId(Optional.ofNullable(teacher.getTenantId()).orElse(-1L));
-        List<LessonCoursewareDetailWrapper.RefLevelDetailInfo> result = tenantAlbumMusicService.refLevel(query);
-
-        return HttpResponseResult.succeed(result);
+        return HttpResponseResult.succeed(tenantAlbumMusicService.refLevel(query));
     }
 
 

+ 2 - 75
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/open/OpenMusicSheetCbsController.java

@@ -1,38 +1,21 @@
 package com.yonge.cooleshow.teacher.controller.open;
 
 import com.alibaba.fastjson.JSON;
-import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
-import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
-import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
-import com.yonge.cooleshow.biz.dal.entity.UserMusic;
-import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
-import com.yonge.cooleshow.biz.dal.service.InstrumentService;
 import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
-import com.yonge.cooleshow.biz.dal.service.UserMusicService;
-import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
 import com.yonge.cooleshow.biz.dal.vo.MusicSheetVo;
-import com.yonge.cooleshow.biz.dal.wrapper.InstrumentWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
-import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import com.yonge.toolset.base.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
 import java.util.Objects;
-import java.util.stream.Collectors;
 
 /**
  * 曲谱表 web 控制层
@@ -44,19 +27,10 @@ import java.util.stream.Collectors;
 @RequestMapping("${app-config.url.teacher:}/open/musicSheet")
 @Api(tags = "曲谱表 API接口")
 public class OpenMusicSheetCbsController extends BaseController {
-    @Resource
-    private SysUserFeignService sysUserFeignService;
 
 	@Resource
 	private MusicSheetService musicSheetService;
 
-
-    @Autowired
-    private InstrumentService instrumentService;
-
-    @Autowired
-    private UserMusicService userMusicService;
-
     /**
      * 查询单条
      *
@@ -68,7 +42,7 @@ public class OpenMusicSheetCbsController extends BaseController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Long id,Boolean simpleFlag,
                                                       @RequestParam(required = false) String tenantAlbumId,
                                                       @RequestParam(required = false) Long userMusicId) {
         // 曲目信息
@@ -79,57 +53,10 @@ public class OpenMusicSheetCbsController extends BaseController {
         if (musicSheet.getCbsMusicSheetId() ==null) {
             throw new BizException("曲目信息异常");
         }
-        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId(), simpleFlag);
         cbsMusicSheet.setBizId(id);
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetVo.MusicSheetDetail.class);
-//        MusicSheetDetailVo detail;
-//        if (userMusicId != null) {
-//            UserMusic userMusic = userMusicService.detail(userMusicId);
-//            if (userMusic == null) {
-//                throw new BizException("参数错误");
-//            } else {
-//                SysUser sysUser = sysUserFeignService.queryUserById(userMusic.getUserId());
-//                detail = musicSheetService.detail(id.toString(), sysUser, ClientEnum.TEACHER, tenantAlbumId);
-//            }
-//        } else {
-//
-//            detail = musicSheetService.detail(id.toString(), null, ClientEnum.TEACHER, tenantAlbumId);
-//        }
-//        if (detail != null) {
-//            // 设置曲目付费类型
-//            musicSheetDetail.setPaymentType(detail.getPaymentType());
-//            // 设置业务端曲目分类
-////            musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
-//            musicSheetDetail.setScoreType(detail.getScoreType());
-//            musicSheetDetail.setIsConvertibleScore(detail.getNotation() ==YesOrNoEnum.YES);
-//            musicSheetDetail.setPlay(detail.getPlay());
-//            musicSheetDetail.setBuyed(detail.getBuyed());
-//            musicSheetDetail.setMusicPrice(detail.getMusicPrice());
-//        }
-//
-//        // 如果是合奏 并且乐器ID = 2268
-//        musicSheetDetail.setSpecialPercussionFlag(false);
-//        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
-//            musicSheetDetail.setSpecialPercussionFlag(true);
-//        }
-//
-//        // 设置乐器信息
-//        if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
-//            List<Long> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))
-//                .map(Long::parseLong).collect(Collectors.toList());
-//
-//            if (CollectionUtils.isNotEmpty(instrumentIds) && CollectionUtils.isNotEmpty(musicSheetDetail.getMusicalInstruments())) {
-//                Map<Long, InstrumentWrapper.Instrument> instrumentMap = instrumentService.getMapByIds(instrumentIds);
-//                for (CbsMusicSheetWrapper.MusicalInstrument musicalInstrument : musicSheetDetail.getMusicalInstruments()) {
-//                    InstrumentWrapper.Instrument instrument = instrumentMap.get(musicalInstrument.getId().longValue());
-//                    if (instrument != null) {
-//                        musicalInstrument.setOrientation(instrument.getOrientation());
-//                    }
-//
-//                }
-//            }
-//        }
         return R.from(musicSheetDetail);
     }
 

+ 14 - 7
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/TenantAlbumSheetController.java

@@ -3,7 +3,6 @@ package com.yonge.cooleshow.tenant.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.dayaedu.cbs.openfeign.client.CoursewareFeignService;
-import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
@@ -20,11 +19,12 @@ import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.http.HttpStatus;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.List;
@@ -40,13 +40,13 @@ import java.util.List;
 @Api(tags = "机构专辑曲目 API接口")
 public class TenantAlbumSheetController extends BaseController {
 
-    @Autowired
+    @Resource
     private TenantAlbumMusicService tenantAlbumMusicService;
 
-    @Autowired
+    @Resource
     private SysUserFeignService sysUserFeignService;
 
-    @Autowired
+    @Resource
     private CoursewareFeignService coursewareFeignService;
 
     @ApiOperation(value = "查询条件")
@@ -96,9 +96,16 @@ public class TenantAlbumSheetController extends BaseController {
 
     @ApiOperation(value = "获取课件关联的课程列表")
     @GetMapping("/getLessonCoursewareCourseList/{id}")
-    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id){
-        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(id).feignData();
+    public HttpResponseResult<List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail>> getLessonCoursewareCourseList(@PathVariable("id") Long id,String search,Boolean detailFlag){
+        CbsLessonCoursewareWrapper.CoursewareDetailQuery query = new CbsLessonCoursewareWrapper.CoursewareDetailQuery();
+        query.setId(id);
+        query.setSearch(search);
+        query.setDetailFlag(detailFlag);
+        List<CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetails = coursewareFeignService.coursewareDetail(query).feignData();
         if (CollectionUtils.isNotEmpty(courseScheduleCoursewareDetails)) {
+            //过滤酷乐秀相关的权限
+            courseScheduleCoursewareDetails.forEach(tenantAlbumMusicService::filterLessonCourseDetail);
+            courseScheduleCoursewareDetails.removeIf(e->!tenantAlbumMusicService.filterAndUpdateKnowledgePointList(e));
             String jsonString = JSONObject.toJSONString(courseScheduleCoursewareDetails);
             List<LessonCoursewareWrapper.CourseScheduleCoursewareDetail> courseScheduleCoursewareDetailList = JSONObject
                 .parseArray(jsonString, LessonCoursewareWrapper.CourseScheduleCoursewareDetail.class);

+ 5 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/website/controller/CourseGroupController.java

@@ -4,6 +4,7 @@ package com.yonge.cooleshow.website.controller;
 import com.yonge.cooleshow.biz.dal.dto.CheckCourseTimeDto;
 import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.AppVersionInfoService;
 import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
 import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
@@ -17,6 +18,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -70,10 +72,12 @@ public class CourseGroupController extends BaseController {
     @ApiOperation("创建直播课程组-新增课程组")
     @PostMapping("/addLiveCourse")
     public HttpResponseResult<Object> addLiveCourse(@RequestBody LiveCourseGroupDto dto) {
-
         if (dto.getCoursePrice().compareTo(BigDecimal.ZERO) <= 0) {
             return failed("课程价格不能为0元");
         }
+        if(StringUtils.isEmpty(dto.getCourseType())){
+            dto.setCourseType(CourseScheduleEnum.LIVE.getCode());
+        }
         courseGroupService.addLiveCourse(dto);
         return succeed();
     }

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/CourseCoursewareSearch.java

@@ -43,6 +43,16 @@ public class CourseCoursewareSearch extends QueryInfo{
 	@ApiModelProperty(value = "用户类型 STUDENT,TEACHER ",hidden = true)
 	private ClientEnum clientType;
 
+	private boolean vipFlag;
+
+	public boolean isVipFlag() {
+		return vipFlag;
+	}
+
+	public void setVipFlag(boolean vipFlag) {
+		this.vipFlag = vipFlag;
+	}
+
 	public String getIdAndName() {
 		return idAndName;
 	}

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java

@@ -87,6 +87,10 @@ public class CourseGroup implements Serializable {
     @ApiModelProperty(value = "最少成课人数")
     private Integer mixStudentNum;
 
+    @TableField("max_student_num_")
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentNum;
+
     @TableField("pre_student_num_")
     @ApiModelProperty(value = "预计上课人数")
     private Integer preStudentNum;

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/mapper/TenantAlbumMusicMapper.java

@@ -42,4 +42,7 @@ public interface TenantAlbumMusicMapper extends BaseMapper<TenantAlbumMusic> {
     List<TenantAlbumMusic> getList(@Param("param") TenantAlbumMusicWrapper.TenantAlbumMusicSelect query, @Param("albumIds") List<Long> albumIds);
 
     List<Long> getTenantAlbumMusicIdsByIds(@Param("tenantAlbumIds") List<Long> tenantAlbumIds, @Param("subjectTypes") List<SubjectTypeEnum> subjectTypes);
+
+	List<TenantAlbumMusicWrapper.MusicSheetSimpleDto> selectPageSimple(@Param("page") IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> page,
+																		   @Param("param") TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query);
 }

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/MusicSheetService.java

@@ -422,13 +422,23 @@ public interface MusicSheetService extends IService<MusicSheet> {
 
     List<CbsMusicSheetWrapper.MusicSheetApplication> queryCbsMusicSheetApplication(CbsMusicSheetWrapper.MusicSheetApplicationQuery query);
 
+    List<CbsMusicSheetWrapper.MusicSheetApplicationSimple> queryCbsMusicSheetApplicationSimple(CbsMusicSheetWrapper.MusicSheetApplicationQuery query);
+
     IPage<MusicSheetVo> queryTenantRelatedList(IPage<Object> page, MusicSheetRelatedQueryInfo queryInfo);
 
     com.microsvc.toolkit.common.response.paging.PageInfo<MusicSheetWrapper.MusicSheetApplication> tenantPage(CbsMusicSheetWrapper.MusicSheetApplicationQuery query);
 
     void delPractice(Long musicSheetId,Long userId,ClientEnum clientEnum);
 
+    CbsMusicSheetWrapper.MusicSheet cbsDetail(Long cbsMusicSheetId,Boolean simpleFlag);
+
     CbsMusicSheetWrapper.MusicSheet cbsDetail(Long cbsMusicSheetId);
 
     IPage<MusicSheetWrapper.MusicSheetCloud> cloudPage(MusicSheetWrapper.MusicSheetCloudQuery query);
+
+    /**
+     * 获取简单的曲谱详情
+     *
+     */
+    MusicSheetWrapper.MusicSheetDetail detailSmall(MusicSheetWrapper.MusicSheetDetailQuery query,SysUser sysUser);
 }

+ 12 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TenantAlbumMusicService.java

@@ -3,6 +3,7 @@ package com.yonge.cooleshow.biz.dal.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWrapper;
+import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
 import com.yonge.cooleshow.biz.dal.enums.SubjectTypeEnum;
 import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareDetailWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareWrapper;
@@ -31,7 +32,11 @@ public interface TenantAlbumMusicService extends IService<TenantAlbumMusic>  {
      * @return IPage<TenantAlbumMusic>
      */
     IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> selectPage(IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page, TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query);
-	
+
+
+    IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> selectPageSimple(IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> page, TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query);
+
+
     /**
      * 添加
      * @param tenantAlbumMusic TenantAlbumMusicWrapper.TenantAlbumMusic
@@ -71,6 +76,12 @@ public interface TenantAlbumMusicService extends IService<TenantAlbumMusic>  {
 
     LessonCoursewareDetailWrapper.LessonCoursewareDetail getLessonCourseDetail(String lessoncoursewareDetailId);
 
+    CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail filterLessonCourseDetail(CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail lessonCoursewareDetail);
+
+    LessonCoursewareDetailWrapper.LessonCoursewareDetail filterLessonCourseDetail(LessonCoursewareDetailWrapper.LessonCoursewareDetail lessonCoursewareDetail);
+
+    boolean filterAndUpdateKnowledgePointList(CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail courseScheduleCoursewareDetail);
+
     /**
      * 关联课程类型
      */

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/UserOrderService.java

@@ -250,4 +250,6 @@ public interface UserOrderService extends IService<UserOrder> {
      *  计算畅学卡优惠
      */
     void discountCard(UserPaymentOrderWrapper.OrderGoodsInfo orderGoodsInfo);
+
+    void updateOrderBizId(String subOrderNo, Long groupId);
 }

+ 15 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseCoursewareServiceImpl.java

@@ -11,11 +11,9 @@ import com.yonge.cooleshow.biz.dal.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.enums.AudioTypeEnum;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
+import com.yonge.cooleshow.biz.dal.enums.EVipType;
 import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
-import com.yonge.cooleshow.biz.dal.service.CourseCoursewareService;
-import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
-import com.yonge.cooleshow.biz.dal.service.SysUserService;
-import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
+import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.vo.CourseCoursewareVo;
 import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
@@ -24,6 +22,7 @@ import com.yonge.toolset.base.exception.BizException;
 import org.apache.commons.collections.CollectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -47,6 +46,9 @@ public class CourseCoursewareServiceImpl extends ServiceImpl<CourseCoursewareDao
     @Resource
     private TenantAlbumMusicService tenantAlbumMusicService;
 
+    @Autowired
+    private TeacherService teacherService;
+
 	@Override
     public CourseCoursewareVo detail(Long id) {
         return baseMapper.detail(id);
@@ -54,6 +56,15 @@ public class CourseCoursewareServiceImpl extends ServiceImpl<CourseCoursewareDao
     
     @Override
     public IPage<CourseCoursewareVo> selectPage(IPage<CourseCoursewareVo> page, CourseCoursewareSearch query){
+
+        // 如果是老师 判断vip
+        if (query.getClientType().equals(ClientEnum.TEACHER)) {
+            TeacherVo detail = teacherService.detail(query.getUserId());
+            if (detail != null) {
+                query.setVipFlag(detail.getUserVip().getVipType() != EVipType.NOT_VIP);
+            }
+        }
+
         IPage<CourseCoursewareVo> courseCoursewareVoIPage = page.setRecords(baseMapper.selectPage(page, query));
         List<CourseCoursewareVo> records = courseCoursewareVoIPage.getRecords();
         if (CollectionUtils.isEmpty(records)) {

+ 3 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -172,7 +172,6 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         }
         param.put("status", status);
         param.put("teacherId", sysUserService.getUserId());
-        param.put("type", CourseScheduleEnum.LIVE.getCode());
         param.put("groupState", String.join(",", CourseGroupEnum.ING.getCode(), CourseGroupEnum.COMPLETE.getCode()));
         log.info("queryTeacherLiveCourse:{}", param);
         Page<TeacherLiveCourseInfoVo> pageInfo = PageUtil.getPageInfo(param);
@@ -2778,6 +2777,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
                 baseMapper.addCourseGroup(scheduleDto);
                 Long groupId = scheduleDto.getGroupId();
 
+                // 更新订单bizId
+                userOrderService.updateOrderBizId(orderGoodsInfo.getSubOrderNo(), groupId);
+
                 BigDecimal subjectPrice = teacherSubjectPrice.getSubjectPrice();
 
                 //每课实际价格

+ 173 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/MusicSheetServiceImpl.java

@@ -56,6 +56,7 @@ import org.joda.time.DateTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -150,6 +151,9 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
     @Resource
     private OpenFeignClientConfigProperties openFeignClientConfigProperties;
 
+    @Autowired
+    private SysUserService sysUserService;
+
     @Value("${openfeign-client.app-id:1745637981387108354}")
     public Long applicationId;
 
@@ -1175,7 +1179,39 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
 
     @Override
     public IPage<TeacherMusicSheetVo> selectTeacherPage(IPage<TeacherMusicSheetVo> page, TeacherMusicSheetSearch query) {
-        return page.setRecords(baseMapper.selectTeacherPage(page, query));
+        IPage<TeacherMusicSheetVo> teacherMusicSheetVoIPage = page.setRecords(baseMapper.selectTeacherPage(page, query));
+        List<TeacherMusicSheetVo> records = teacherMusicSheetVoIPage.getRecords();
+        if (CollectionUtils.isEmpty(records)) {
+           return teacherMusicSheetVoIPage;
+        }
+        // 曲目ID
+        List<String> musicIds = records.stream().map(TeacherMusicSheetVo::getMusicSheetId).collect(Collectors.toList());
+
+        List<MusicSheetAuthRecord> list = musicSheetAuthRecordService.lambdaQuery()
+                .in(MusicSheetAuthRecord::getMusicSheetId, musicIds)
+                .eq(MusicSheetAuthRecord::getAuditState, AuthStatusEnum.PASS)
+                .orderByAsc(MusicSheetAuthRecord::getId)
+                .list();
+        if (CollectionUtils.isNotEmpty(list)) {
+            Map<Long, MusicSheetAuthRecord> musicSheetAuthRecordMap = list.stream().collect(Collectors.toMap(MusicSheetAuthRecord::getMusicSheetId, Function.identity(), (o, n) -> n));
+            // 审核人 ID集合
+            List<Long> auditUserIds = list.stream().map(MusicSheetAuthRecord::getVerifyUserId).collect(Collectors.toList());
+            Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(auditUserIds);
+            for (TeacherMusicSheetVo record : records) {
+                MusicSheetAuthRecord musicSheetAuthRecord = musicSheetAuthRecordMap.get(Long.parseLong(record.getMusicSheetId()));
+                if (musicSheetAuthRecord != null && musicSheetAuthRecord.getVerifyUserId() != null) {
+                    com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = mapByIds.get(musicSheetAuthRecord.getVerifyUserId());
+                    if (sysUser != null) {
+                        record.setAuditName(sysUser.getUsername());
+                    }
+
+                }
+            }
+        }
+
+
+        return teacherMusicSheetVoIPage;
+
     }
 
     @Override
@@ -2564,6 +2600,20 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
     }
 
     @Override
+    public List<CbsMusicSheetWrapper.MusicSheetApplicationSimple> queryCbsMusicSheetApplicationSimple(CbsMusicSheetWrapper.MusicSheetApplicationQuery query) {
+        R<com.microsvc.toolkit.common.response.paging.PageInfo<CbsMusicSheetWrapper.MusicSheetApplicationSimple>> pageInfoR =
+                musicFeignClientService.musicSheetPageByApplicationSimple(query);
+        if(pageInfoR.getCode() != 200){
+            throw new BizException("获取曲目信息失败");
+        }
+        com.microsvc.toolkit.common.response.paging.PageInfo<CbsMusicSheetWrapper.MusicSheetApplicationSimple> pageInfo = pageInfoR.getData();
+        if(pageInfo != null && CollectionUtils.isNotEmpty(pageInfo.getRows())){
+            return pageInfo.getRows();
+        }
+        return new ArrayList<>();
+    }
+
+    @Override
     public IPage<MusicSheetVo> queryTenantRelatedList(IPage<Object> page, MusicSheetRelatedQueryInfo queryInfo) {
 
         MusicSheet musicSheet = musicSheetDao.get(queryInfo.getMusicSheetId());
@@ -2617,6 +2667,29 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
 
 
     /**
+     *
+     * @return CbsMusicSheetWrapper.MusicSheet
+     */
+    @Override
+    public CbsMusicSheetWrapper.MusicSheet cbsDetail(Long cbsMusicSheetId,Boolean simpleFlag) {
+        try {
+
+            R<CbsMusicSheetWrapper.MusicSheet> musicSheetR = musicFeignClientService.musicSheetDetail(cbsMusicSheetId , applicationId);
+
+            CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetR.feignData();
+            if(simpleFlag!= null && simpleFlag){
+                musicSheet.setExtConfigJson(null);
+                musicSheet.setExtStyleConfigJson(null);
+                musicSheet.setExtJianStyleConfigJson(null);
+            }
+            return musicSheet;
+        } catch (Exception e) {
+            log.error("调用音乐服务异常", e);
+            throw new BizException("内容平台服务异常");
+        }
+    }
+
+    /**
      * @param musicSheetId 业务端曲目ID
      * @return CbsMusicSheetWrapper.MusicSheet
      */
@@ -2660,6 +2733,105 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         return musicSheetCloudIPage;
     }
 
+
+    /**
+     * 获取简单的曲谱详情
+     *
+     */
+    @Override
+    public MusicSheetWrapper.MusicSheetDetail detailSmall(MusicSheetWrapper.MusicSheetDetailQuery query,SysUser sysUser) {
+        // 曲目信息
+        MusicSheet musicSheet = musicSheetService.getDao().get(query.getMusicSheetId());
+        if (Objects.isNull(musicSheet)) {
+            throw new BizException("曲目信息不存在");
+        }
+        if (musicSheet.getCbsMusicSheetId() ==null) {
+            throw new BizException("曲目信息异常");
+        }
+
+        // 设置查询机构 还是平台数据
+        if (StringUtils.isBlank(query.getTenantAlbumId()) && StringUtils.isNotBlank(query.getProviderType())) {
+            if (SourceTypeEnum.PLATFORM.name().equals(query.getProviderType())) {
+                query.setTenantAlbumId(null);
+            } else {
+                query.setTenantAlbumId("-1");
+            }
+        }
+
+        CbsMusicSheetWrapper.MusicSheet cbsMusicSheet = musicSheetService.cbsDetail(musicSheet.getCbsMusicSheetId());
+        cbsMusicSheet.setBizId(query.getMusicSheetId());
+
+        MusicSheetWrapper.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(cbsMusicSheet), MusicSheetWrapper.MusicSheetDetail.class);
+        musicSheetDetail.setId(query.getMusicSheetId().toString());
+
+        MusicSheetDetailVo detail = musicSheetService.detail(query.getMusicSheetId().toString(), sysUser,query.getClient(), query.getTenantAlbumId());
+        if (detail != null) {
+            // 设置曲目付费类型
+            musicSheetDetail.setPaymentType(detail.getPaymentType());
+            // 设置业务端曲目分类
+            musicSheetDetail.setScoreType(detail.getScoreType());
+            musicSheetDetail.setIsConvertibleScore(detail.getNotation() ==YesOrNoEnum.YES);
+            musicSheetDetail.setPlay(detail.getPlay());
+            musicSheetDetail.setMusicPrice(detail.getMusicPrice());
+            musicSheetDetail.setFavorite(detail.getFavorite());
+            musicSheetDetail.setFavoriteCount(detail.getFavoriteCount());
+            musicSheetDetail.setCoursewareId(detail.getCoursewareId());
+            musicSheetDetail.setCoursewareStatus(detail.getCoursewareStatus());
+            musicSheetDetail.setOrderStatus(detail.getOrderStatus());
+            musicSheetDetail.setUserName(detail.getUserName());
+            musicSheetDetail.setMusicSubject(detail.getMusicSubject());
+        }
+        musicSheetDetail.setFavoriteCount(musicSheet.getFavoriteCount());
+        //获取曲目专辑数量
+        musicSheetDetail.setAlbumNums(musicSheetService.getDao().selectMusicAlbumNum(query.getMusicSheetId()));
+        musicSheetDetail.setExquisiteFlag(musicSheet.getExquisiteFlag());
+        musicSheetDetail.setMusicSubject(musicSheet.getMusicSubject());
+        musicSheetDetail.setUserId(musicSheet.getUserId());
+
+        //mp3Url 如果是合奏 取伴奏,
+        if (musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            if (CollectionUtils.isNotEmpty(cbsMusicSheet.getMusicSheetAccompanimentList())) {
+                Optional<CbsMusicSheetWrapper.MusicSheetAccompaniment> first = cbsMusicSheet.getMusicSheetAccompanimentList().stream()
+                        .filter(o -> o.getAudioPlayType() == EAudioPlayType.PLAY).collect(Collectors.toList()).stream().findFirst();
+                first.ifPresent(musicSheetAccompaniment -> musicSheetDetail.setMp3Url(musicSheetAccompaniment.getAudioFileUrl()));
+            }
+        } else if (CollectionUtils.isNotEmpty(cbsMusicSheet.getMusicSheetSoundList())) {
+            musicSheetDetail.setMusicSheetSoundList(new ArrayList<>());
+            // 按乐器取原音 有乐器按乐器来,没乐器用声部,都不匹配取第一个
+            List<CbsMusicSheetWrapper.MusicSheetSound> sheetSoundList = cbsMusicSheet.getMusicSheetSoundList().stream()
+                    .filter(o -> o.getAudioPlayType() == EAudioPlayType.PLAY)
+                    .collect(Collectors.toList());
+            if (query.getInstrumentId() !=null) {
+                Optional<CbsMusicSheetWrapper.MusicSheetSound> first =sheetSoundList.stream()
+                        .filter(o->StringUtils.isNotBlank(o.getMusicalInstrumentId()))
+                        .filter(o -> o.getMusicalInstrumentId().equals(query.getInstrumentId().toString())).findFirst();
+                if (first.isPresent()) {
+                    musicSheetDetail.setMp3Url(first.get().getAudioFileUrl());
+                    musicSheetDetail.setMusicSheetSoundList(Collections.singletonList(first.get()));
+                }
+            } else if (query.getSubjectId() != null){
+                Subject subject = subjectService.get(query.getSubjectId());
+                if (subject != null && subject.getInstrumentId() !=null) {
+                    Optional<CbsMusicSheetWrapper.MusicSheetSound> first = sheetSoundList.stream()
+                            .filter(o->StringUtils.isNotBlank(o.getMusicalInstrumentId()))
+                            .filter(o -> o.getMusicalInstrumentId().equals(subject.getInstrumentId().toString())).findFirst();
+                    if (first.isPresent()) {
+                        musicSheetDetail.setMp3Url(first.get().getAudioFileUrl());
+                        musicSheetDetail.setMusicSheetSoundList(Collections.singletonList(first.get()));
+                    }
+                }
+            }
+            if (CollectionUtils.isEmpty(musicSheetDetail.getMusicSheetSoundList()) && CollectionUtils.isNotEmpty(sheetSoundList)) {
+                Optional<CbsMusicSheetWrapper.MusicSheetSound> first = sheetSoundList.stream().findFirst();
+                if (first.isPresent()) {
+                    musicSheetDetail.setMp3Url(first.get().getAudioFileUrl());
+                    musicSheetDetail.setMusicSheetSoundList(Collections.singletonList(first.get()));
+                }
+            }
+        }
+        return musicSheetDetail;
+    }
+
     private Map<Long,MusicSheet> getMapByCbsIds(List<Long> cbsMusicSheetIds) {
         if (CollectionUtils.isEmpty(cbsMusicSheetIds)) {
             return new HashMap<>();

+ 7 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PaymentDivMemberRecordServiceImpl.java

@@ -998,6 +998,9 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
         }
 
         BigDecimal amount = tenantdivMap.values().stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+        if (amount.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         boolean tenantEnterFlag = false;
         //  执行分账
         TenantMember tenantMember = null;
@@ -1053,6 +1056,10 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
     }
 
     private void teacherShare(UserOrderDetailVo userPaymentOrder, BigDecimal shareFee) {
+
+        if (shareFee.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         //获取账期时间
         Date accountPeriodTime = userOrderService.getAccountPeriodTime(userPaymentOrder);
         AccountBizTypeEnum bizTypeEnum;

+ 7 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java

@@ -440,6 +440,13 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
 
         teacherHomeVo.setUserVip(vipCardRecordService.userVipInfo(teacherHomeVo.getUserId(), ClientEnum.TEACHER));
 
+        // 添加乐器ID信息,由声部转为乐器
+        if (StringUtils.isNotBlank(teacherHomeVo.getSubjectId())) {
+            List<Long> subjectIds = Arrays.stream(teacherHomeVo.getSubjectId().split(",")).map(Long::parseLong).collect(Collectors.toList());
+            List<Subject> subjects = subjectService.findBySubjectByIdList(subjectIds);
+            List<String> instrumentIds = subjects.stream().map(Subject::getInstrumentId).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.toList());
+            teacherHomeVo.setInstrumentId(String.join(",", instrumentIds));
+        }
 
         if (YesOrNoEnum.YES.equals(teacher.getMusicianFlag())) {
             teacherHomeVo.setMusicianAuthStatus(AuthStatusEnum.PASS);

+ 193 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumMusicServiceImpl.java

@@ -14,24 +14,21 @@ import com.dayaedu.cbs.openfeign.client.MusicFeignClientService;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsCourseTypeWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
+import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsMaterialRefWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.paging.PageInfo;
-import com.microsvc.toolkit.common.response.template.R;
 import com.yonge.cooleshow.biz.dal.entity.*;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.enums.SourceTypeEnum;
 import com.yonge.cooleshow.biz.dal.enums.SubjectTypeEnum;
 import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumMapper;
 import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumMusicMapper;
-import com.yonge.cooleshow.biz.dal.mapper.UserTenantAlbumRecordMapper;
 import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareDetailWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumWrapper;
 import com.yonge.cooleshow.common.constant.SysConfigConstant;
-import com.yonge.cooleshow.common.enums.YesOrNoEnum;
-import com.yonge.cooleshow.common.constant.SysConfigConstant;
 import com.yonge.toolset.base.exception.BizException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
@@ -41,6 +38,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -252,6 +250,30 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         return page.setRecords(musicSheets);
     }
 
+    @Override
+    public IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> selectPageSimple(IPage<TenantAlbumMusicWrapper.MusicSheetSimpleDto> page, TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
+        List<TenantAlbumMusicWrapper.MusicSheetSimpleDto> musicSheets = tenantAlbumMusicMapper.selectPageSimple(page, query);
+        if (CollectionUtils.isEmpty(musicSheets)) {
+            return page.setRecords(musicSheets);
+        }
+        CbsMusicSheetWrapper.MusicSheetApplicationQuery cbsQuery = musicSheetService.getMusicSheetApplicationQuery(SourceTypeEnum.TENANT);
+        List<Long> cbsMusicSheetIds = musicSheets.stream().map(e -> Long.parseLong(e.getCbsMusicSheetId())).collect(Collectors.toList());
+        cbsQuery.setMusicSheetIds(cbsMusicSheetIds);
+        cbsQuery.setRows(cbsMusicSheetIds.size());
+        List<CbsMusicSheetWrapper.MusicSheetApplicationSimple> applications = musicSheetService.queryCbsMusicSheetApplicationSimple(cbsQuery);
+        if(CollectionUtils.isNotEmpty(applications)){
+            Map<Long, CbsMusicSheetWrapper.MusicSheetApplicationSimple> musicSheetApplicationMap = applications
+                    .stream().collect(Collectors.toMap(CbsMusicSheetWrapper.MusicSheetApplicationSimple::getId, Function.identity()));
+            for (TenantAlbumMusicWrapper.MusicSheetSimpleDto record : musicSheets) {
+                CbsMusicSheetWrapper.MusicSheetApplicationSimple simple = musicSheetApplicationMap.get(Long.parseLong(record.getCbsMusicSheetId()));
+                record.setAudioFileUrl(simple.getAudioFileUrl());
+                record.setName(simple.getName());
+                record.setTitleImg(simple.getTitleImg());
+            }
+        }
+        return page.setRecords(musicSheets);
+    }
+
     /**
      * 添加
      * @param tenantAlbumMusic TenantAlbumMusicWrapper.TenantAlbumMusic
@@ -477,8 +499,105 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
             throw new BizException("课件不存在");
         }
         LessonCoursewareDetailWrapper.LessonCoursewareDetail lessonCoursewareDetail = JSON.parseObject(JSON.toJSONString(cbsLessonCoursewareDetail), LessonCoursewareDetailWrapper.LessonCoursewareDetail.class);
+        // 过滤调未应用到项目的去练习曲目
+        this.filterLessonCourseDetail(lessonCoursewareDetail);
+        return lessonCoursewareDetail;
+    }
 
+    @Override
+    public CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail filterLessonCourseDetail(CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail lessonCoursewareDetail) {
+        // 过滤调未应用到项目的去练习曲目
+        List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList = lessonCoursewareDetail.getKnowledgePointList();
+        List<CbsMaterialRefWrapper.AddMaterialRef> addMaterialRefs = getCbsMaterialRefList(knowledgePointList);
+        List<CbsLessonCoursewareDetailWrapper.MaterialSmall> musicMaterialSmalls = getCbsMaterialSmalls(knowledgePointList);
+        if (CollectionUtils.isNotEmpty(musicMaterialSmalls)) {
+            List<Long> cbsMaterialMusicIds = musicMaterialSmalls.stream().map(CbsLessonCoursewareDetailWrapper.MaterialSmall::getContent)
+                .filter(StringUtils::isNotBlank).map(Long::parseLong).collect(Collectors.toList());
+            Map<Long, Long> idMap = musicSheetService.lambdaQuery()
+                .in(MusicSheet::getCbsMusicSheetId, cbsMaterialMusicIds)
+                .eq(MusicSheet::getTenantDelFlag, false)
+                .eq(MusicSheet::getTenantState, 1)
+                .list()
+                .stream()
+                .collect(Collectors.toMap(MusicSheet::getCbsMusicSheetId, MusicSheet::getId,(o1,o2)->o1));
 
+            // 过滤掉没有对应的曲目
+            filterCbsMusicMaterialList(knowledgePointList,new ArrayList<>(idMap.keySet()));
+            for (CbsLessonCoursewareDetailWrapper.MaterialSmall musicMaterialSmall : musicMaterialSmalls) {
+                musicMaterialSmall.setContent(idMap.getOrDefault(Long.parseLong(musicMaterialSmall.getContent()),-1L).toString());
+            }
+        }
+        List<Long> cbsMusicSheetIdList =
+            addMaterialRefs.stream().filter(next -> EKnowledgeType.MUSIC.equals(next.getKnowledgeType()))
+                .map(CbsMaterialRefWrapper.AddMaterialRef::getResourceId).distinct().collect(Collectors.toList());
+        if (!org.springframework.util.CollectionUtils.isEmpty(cbsMusicSheetIdList)) {
+            Map<Long, Long> idMap = musicSheetService.lambdaQuery()
+                .in(MusicSheet::getCbsMusicSheetId, cbsMusicSheetIdList)
+                .eq(MusicSheet::getTenantDelFlag, false)
+                .eq(MusicSheet::getTenantState, 1)
+                .list()
+                .stream()
+                .collect(Collectors.toMap(MusicSheet::getCbsMusicSheetId, MusicSheet::getId,(o1,o2)->o1));
+
+            for (CbsMaterialRefWrapper.AddMaterialRef addMaterialRef : addMaterialRefs) {
+                Long resourceId = addMaterialRef.getResourceId();
+                if (idMap.containsKey(resourceId)) {
+                    addMaterialRef.setResourceId(idMap.get(resourceId));
+                    addMaterialRef.setResourceIdStr(idMap.getOrDefault(resourceId,-1L).toString());
+                }
+            }
+            // 过滤掉没有对应的曲目
+            filterCbsMaterialRefList(knowledgePointList,new ArrayList<>(idMap.values()));
+        }
+
+        return lessonCoursewareDetail;
+    }
+
+
+    private List<CbsLessonCoursewareDetailWrapper.MaterialSmall> getCbsMaterialSmalls(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList) {
+        List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialRefList = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(knowledgePointList)) {
+            for (CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {
+
+                if (CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren())) {
+                    materialRefList.addAll(getCbsMaterialSmalls(knowledgePointSmall.getChildren()));
+                }
+                List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList = knowledgePointSmall.getMaterialList();
+                if (CollectionUtils.isNotEmpty(materialList)) {
+                    for (CbsLessonCoursewareDetailWrapper.MaterialSmall materialSmall : materialList) {
+                        if (materialSmall.getType() == EMaterialType.SONG) {
+                            materialRefList.add(materialSmall);
+                        }
+                    }
+                }
+            }
+        }
+        return materialRefList;
+    }
+
+    private List<CbsMaterialRefWrapper.AddMaterialRef> getCbsMaterialRefList(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList) {
+        List<CbsMaterialRefWrapper.AddMaterialRef> materialRefList = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(knowledgePointList)) {
+            for (CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {
+
+                if (CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren())) {
+                    materialRefList.addAll(getCbsMaterialRefList(knowledgePointSmall.getChildren()));
+                }
+                List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList = knowledgePointSmall.getMaterialList();
+                if (CollectionUtils.isNotEmpty(materialList)) {
+                    for (CbsLessonCoursewareDetailWrapper.MaterialSmall materialSmall : materialList) {
+                        if (CollectionUtils.isNotEmpty(materialSmall.getMaterialRefs())) {
+                            materialRefList.addAll(materialSmall.getMaterialRefs());
+                        }
+                    }
+                }
+            }
+        }
+        return materialRefList;
+    }
+
+    @Override
+    public LessonCoursewareDetailWrapper.LessonCoursewareDetail filterLessonCourseDetail(LessonCoursewareDetailWrapper.LessonCoursewareDetail lessonCoursewareDetail) {
         // 过滤调未应用到项目的去练习曲目
         List<LessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList = lessonCoursewareDetail.getKnowledgePointList();
         List<LessonCoursewareDetailWrapper.AddMaterialRef> addMaterialRefs = getMaterialRefList(knowledgePointList);
@@ -526,6 +645,39 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         return lessonCoursewareDetail;
     }
 
+    @Override
+    public boolean filterAndUpdateKnowledgePointList(CbsLessonCoursewareWrapper.CourseScheduleCoursewareDetail courseScheduleCoursewareDetail) {
+        List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList = courseScheduleCoursewareDetail.getKnowledgePointList();
+        if (CollectionUtils.isEmpty(knowledgePointList)) {
+            return false; // 如果 knowledgePointList 为空,直接返回 false,后续会删除该 courseScheduleCoursewareDetail
+        }
+
+        // 过滤 KnowledgePointSmall
+        knowledgePointList.removeIf(knowledgePointSmall -> !filterKnowledgePoint(knowledgePointSmall));
+        courseScheduleCoursewareDetail.setKnowledgePointList(knowledgePointList);
+
+        // 如果过滤后的 knowledgePointList 为空,返回 false
+        return CollectionUtils.isNotEmpty(knowledgePointList);
+    }
+
+    private boolean filterKnowledgePoint(CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall) {
+        // 过滤 materialList
+//        if (CollectionUtils.isNotEmpty(knowledgePointSmall.getMaterialList())) {
+//            filterAndUpdateMaterialList(knowledgePointSmall.getMaterialList(), search);
+//        }
+        // 过滤子知识点 children
+        if (CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren())) {
+            knowledgePointSmall.getChildren().removeIf(child -> !filterKnowledgePoint(child));
+        }
+        // 保留当前的条件:materialList 不为空 或者 children 不为空,**否则删除当前节点**
+        return CollectionUtils.isNotEmpty(knowledgePointSmall.getMaterialList()) ||
+                CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren());
+    }
+
+    private void filterAndUpdateMaterialList(List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList, String search) {
+        materialList.removeIf(materialSmall -> !materialSmall.getName().contains(search));
+    }
+
     /**
      * 关联课程类型
      *
@@ -631,6 +783,22 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
 
     }
 
+    private void filterCbsMusicMaterialList(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList, List<Long> cbsMusicSheetIds) {
+        if (CollectionUtils.isNotEmpty(knowledgePointList)) {
+            for (CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {
+
+                if (CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren())) {
+                    filterCbsMusicMaterialList(knowledgePointSmall.getChildren(),cbsMusicSheetIds);
+                }
+                List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList = knowledgePointSmall.getMaterialList();
+                if (CollectionUtils.isNotEmpty(materialList)) {
+                    materialList.removeIf(next -> (EMaterialType.SONG.equals(next.getType()) && !cbsMusicSheetIds.contains(Long.parseLong(next.getContent()))));
+                    knowledgePointSmall.setMaterialList(materialList);
+                }
+            }
+        }
+    }
+
     private void filterMusicMaterialList(List<LessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList, List<Long> cbsMusicSheetIds) {
         if (CollectionUtils.isNotEmpty(knowledgePointList)) {
             for (LessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {
@@ -668,6 +836,27 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         return materialRefList;
     }
 
+    private void filterCbsMaterialRefList(List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList,List<Long> cbsMusicSheetIds) {
+        if (CollectionUtils.isNotEmpty(knowledgePointList)) {
+            for (CbsLessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {
+
+                if (CollectionUtils.isNotEmpty(knowledgePointSmall.getChildren())) {
+                    filterCbsMaterialRefList(knowledgePointSmall.getChildren(),cbsMusicSheetIds);
+                }
+                List<CbsLessonCoursewareDetailWrapper.MaterialSmall> materialList = knowledgePointSmall.getMaterialList();
+                if (CollectionUtils.isNotEmpty(materialList)) {
+                    for (CbsLessonCoursewareDetailWrapper.MaterialSmall materialSmall : materialList) {
+                        if (CollectionUtils.isNotEmpty(materialSmall.getMaterialRefs())) {
+                            List<CbsMaterialRefWrapper.AddMaterialRef> refList = materialSmall.getMaterialRefs().stream()
+                                .filter(next -> !(EKnowledgeType.MUSIC.equals(next.getKnowledgeType()) && !cbsMusicSheetIds.contains(next.getResourceId())))
+                                .collect(Collectors.toList());
+                            materialSmall.setMaterialRefs(refList);
+                        }
+                    }
+                }
+            }
+        }
+    }
     private void filterMaterialRefList(List<LessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList,List<Long> cbsMusicSheetIds) {
         if (CollectionUtils.isNotEmpty(knowledgePointList)) {
             for (LessonCoursewareDetailWrapper.KnowledgePointSmall knowledgePointSmall : knowledgePointList) {

+ 9 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderServiceImpl.java

@@ -1671,4 +1671,13 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
         }
     }
 
+    @Override
+    @Transactional
+    public void updateOrderBizId(String subOrderNo, Long groupId) {
+        userOrderDetailService.lambdaUpdate()
+                .eq(UserOrderDetail::getSubOrderNo, subOrderNo)
+                .set(UserOrderDetail::getBizId, groupId)
+                .update();
+    }
+
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseGroupVo.java

@@ -40,6 +40,9 @@ public class CourseGroupVo implements Serializable {
     @ApiModelProperty(value = "课程人数")
     private Integer studentCount;
 
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentCount;
+
     @ApiModelProperty(value = "课程图片")
     private String backgroundPic;
 

+ 5 - 71
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseRepliedVo.java

@@ -3,12 +3,15 @@ package com.yonge.cooleshow.biz.dal.vo;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleReplied;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
 import java.util.Date;
 
 /**
  * @Author: cy
  * @Date: 2022/4/19
  */
+@Data
 @ApiModel(value = "CourseRepliedVo")
 public class CourseRepliedVo extends CourseScheduleReplied {
     @ApiModelProperty("用户名")
@@ -37,75 +40,6 @@ public class CourseRepliedVo extends CourseScheduleReplied {
     @ApiModelProperty("声部名称")
     private String subjectName;
 
-    public String getRealName() {
-        return realName;
-    }
-
-    public void setRealName(String realName) {
-        this.realName = realName;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getAvatar() {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar) {
-        this.avatar = avatar;
-    }
-
-    public String getClassDate() {
-        return classDate;
-    }
-
-    public void setClassDate(String classDate) {
-        this.classDate = classDate;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public Integer getSubjectId() {
-        return subjectId;
-    }
-
-    public void setSubjectId(Integer subjectId) {
-        this.subjectId = subjectId;
-    }
-
-    public String getSubjectName() {
-        return subjectName;
-    }
-
-    public void setSubjectName(String subjectName) {
-        this.subjectName = subjectName;
-    }
+    @ApiModelProperty("课程组名称")
+    private String courseGroupName;
 }

+ 0 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseInfoVo.java

@@ -33,7 +33,6 @@ public class LiveCourseInfoVo extends CourseGroupVo implements Serializable {
     @ApiModelProperty("学位认证 0:未认证 1:已认证 ")
     private YesOrNoEnum degreeFlag;
 
-
     @ApiModelProperty("教师资格认证 0:未认证 1:已认证 ")
     private YesOrNoEnum teacherFlag;
 

+ 4 - 119
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyRepliedVo.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.biz.dal.vo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -11,6 +12,7 @@ import java.util.Date;
  * @Date: 2022/4/13
  */
 @ApiModel(value = "MyRepliedVo")
+@Data
 public class MyRepliedVo implements Serializable {
     @ApiModelProperty(value = "课程id")
     private Long courseId;
@@ -56,123 +58,6 @@ public class MyRepliedVo implements Serializable {
     @ApiModelProperty(value = "学生评价内容")
     private String studentRepliedStr;
 
-    public String getStudentRepliedStr() {
-        return studentRepliedStr;
-    }
-
-    public void setStudentRepliedStr(String studentRepliedStr) {
-        this.studentRepliedStr = studentRepliedStr;
-    }
-
-    public Integer getStudentReplied() {
-        return studentReplied;
-    }
-
-    public void setStudentReplied(Integer studentReplied) {
-        this.studentReplied = studentReplied;
-    }
-
-    public Integer getTeacherReplied() {
-        return teacherReplied;
-    }
-
-    public void setTeacherReplied(Integer teacherReplied) {
-        this.teacherReplied = teacherReplied;
-    }
-
-    public String getRealName() {
-        return realName;
-    }
-
-    public void setRealName(String realName) {
-        this.realName = realName;
-    }
-
-    public Long getCourseId() {
-        return courseId;
-    }
-
-    public void setCourseId(Long courseId) {
-        this.courseId = courseId;
-    }
-
-    public Long getCourseGroupId() {
-        return courseGroupId;
-    }
-
-    public void setCourseGroupId(Long courseGroupId) {
-        this.courseGroupId = courseGroupId;
-    }
-
-    public Long getUserId() {
-        return userId;
-    }
-
-    public void setUserId(Long userId) {
-        this.userId = userId;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getAvatar() {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar) {
-        this.avatar = avatar;
-    }
-
-    public Date getClassDate() {
-        return classDate;
-    }
-
-    public void setClassDate(Date classDate) {
-        this.classDate = classDate;
-    }
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public Integer getSubjectId() {
-        return subjectId;
-    }
-
-    public void setSubjectId(Integer subjectId) {
-        this.subjectId = subjectId;
-    }
-
-    public String getSubjectName() {
-        return subjectName;
-    }
-
-    public void setSubjectName(String subjectName) {
-        this.subjectName = subjectName;
-    }
-
-    public String getScore() {
-        return score;
-    }
-
-    public void setScore(String score) {
-        this.score = score;
-    }
+    @ApiModelProperty("课程组名称")
+    private String courseGroupName;
 }

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherHomeVo.java

@@ -106,6 +106,10 @@ public class TeacherHomeVo extends Teacher implements Serializable {
     @ApiModelProperty("客服数量")
     private Integer customerServiceNum;
 
+
+    @ApiModelProperty(value = "总控乐器ID")
+    private String instrumentId;
+
     public String getTenantName() {
         return tenantName;
     }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherLiveCourseInfoVo.java

@@ -49,6 +49,9 @@ public class TeacherLiveCourseInfoVo implements Serializable {
     @ApiModelProperty(value = "课程人数")
     private Integer studentCount;
 
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentCount;
+
     @ApiModelProperty(value = "课程图片")
     private String backgroundPic;
 

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/LessonCoursewareWrapper.java

@@ -67,6 +67,9 @@ public class LessonCoursewareWrapper {
         @ApiModelProperty("课程计划详情编号")
         private String coursewareDetailId;
 
+        @ApiModelProperty("课时目标描述")
+        private String lessonTargetDesc;
+
         // 课件名称
         @ApiModelProperty("课件详情名称")
         private String coursewareDetailName;

+ 112 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/MusicSheetWrapper.java

@@ -11,7 +11,6 @@ import com.dayaedu.cbs.common.enums.music.*;
 import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
-import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
 import com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment;
 import com.yonge.cooleshow.biz.dal.enums.*;
 import com.yonge.cooleshow.common.enums.YesOrNoEnum;
@@ -1063,4 +1062,116 @@ public class MusicSheetWrapper {
             return JSON.parseObject(json, MusicSheetQuery.class);
         }
     }
+
+    @Data
+    public  static class MusicSheetDetailQuery {
+
+        @ApiModelProperty("曲谱ID")
+        @NotNull(message = "曲谱ID不能为空")
+        private Long musicSheetId;
+
+        @ApiModelProperty("机构专辑ID")
+        private String tenantAlbumId;
+
+        @ApiModelProperty("数据提供方")
+        private String providerType;
+
+        @ApiModelProperty("乐器ID")
+        private Long instrumentId;
+
+        @ApiModelProperty("声部ID")
+        private Long subjectId;
+
+        private ClientEnum client;
+
+    }
+
+
+    @Data
+    public  static class MusicSheetDetail {
+
+
+        @ApiModelProperty("收藏0:否,1:是")
+        private YesOrNoEnum favorite;
+
+        @ApiModelProperty(value = "收藏数")
+        private Integer favoriteCount;
+
+        @ApiModelProperty("课件id")
+        private Long coursewareId;
+
+        @ApiModelProperty("是否为课件")
+        private YesOrNoEnum coursewareStatus = YesOrNoEnum.NO;
+
+        @ApiModelProperty(value = "精品标志(0:否;1:是)")
+        private YesOrNoEnum exquisiteFlag;
+
+        @ApiModelProperty("订单状态(WAIT_PAY:待支付;PAYING:支付中,PAID:已付款)")
+        private OrderStatusEnum orderStatus;
+
+        @ApiModelProperty("是否能播放(0:否,1:是) 学生端进入小酷Ai判断 试用/完整 播放")
+        private YesOrNoEnum play;
+
+        @ApiModelProperty("单曲专辑数")
+        private Long albumNums;
+
+        @ApiModelProperty(value = "曲谱价格")
+        private java.math.BigDecimal musicPrice;  //曲谱价格
+        @ApiModelProperty(value = "收费类型(FREE:免费;VIP:会员;CHARGE:单曲收费)")
+        private String paymentType;
+
+        @ApiModelProperty("播放模式(MIDI;MP3)")
+        private EMusicPlayMode playMode;
+
+        @ApiModelProperty(value = "MP3原声音频文件URL")
+        private String mp3Url;  //
+
+        @ApiModelProperty("谱面类型")
+        private String scoreType;
+        @ApiModelProperty("上传老师名称")
+        private String userName;
+
+        @ApiModelProperty(value = "曲谱来源(平台用户ID或者是老师ID)")
+        private Long userId;  //曲谱来源(平台用户ID或者是老师ID)
+
+        @ApiModelProperty("声部Id")
+        private String musicSubject;
+        @ApiModelProperty("是否可转谱(0:否; 1:是)")
+        private Boolean isConvertibleScore;
+
+// 上面业务逻辑字段
+
+        @ApiModelProperty("主键")
+        private String id;
+        @ApiModelProperty("曲目封面图")
+        private String musicCover;
+        @ApiModelProperty("曲目名称")
+        private String name;
+
+
+        @ApiModelProperty("是否总谱渲染")
+        private Boolean isScoreRender;
+        @ApiModelProperty("多声轨选择")
+        private String multiTracksSelection;
+        @ApiModelProperty("曲目类型(SINGLE:单曲 CONCERT:合奏)")
+        private EMusicSheetType musicSheetType;
+        @ApiModelProperty("曲目原音")
+        private List<CbsMusicSheetWrapper.MusicSheetSound> musicSheetSoundList;
+
+        @ApiModelProperty("五线谱PDF文件")
+        private String musicPdfUrl;
+        @ApiModelProperty("首调PDF文件")
+        private String firstPdfUrl;
+        @ApiModelProperty("固定调PDF文件")
+        private String jianPdfUrl;
+        @ApiModelProperty("演奏是否默认展示总谱渲染")
+        private Boolean defaultScoreRender;
+
+        @ApiModelProperty("来源类型/作者属性(PLATFORM: 平台; ORG: 机构; PERSON: 个人)")
+        private EMusicSourceType sourceType;
+        @ApiModelProperty("作曲人/音乐人")
+        private String composer;
+
+
+    }
 }

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantAlbumMusicWrapper.java

@@ -209,6 +209,26 @@ public class TenantAlbumMusicWrapper {
 
     }
 
+
+    @Data
+    public static class MusicSheetSimpleDto{
+
+        @ApiModelProperty("主键")
+        private Long id;
+
+        @ApiModelProperty("内容平台曲目ID")
+        private String cbsMusicSheetId;
+
+        @ApiModelProperty("曲目封面图")
+        private String titleImg;
+
+        @ApiModelProperty("曲目名称")
+        private String name;
+
+        @ApiModelProperty("音频文件")
+        private String audioFileUrl;
+    }
+
     @Data
     @Builder
     @NoArgsConstructor

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseCoursewareMapper.xml

@@ -63,7 +63,7 @@
                 or  EXISTS (select mspr.music_sheet_id_ from music_sheet_purchase_record mspr
                 left join album_music_relate amr on amr.album_id_ = mspr.music_sheet_id_
                 where mspr.student_id_ = t.user_id_ and mspr.order_status_ = 'PAID' and mspr.purchase_type_ = 'ALBUM' and amr.music_sheet_id_ = ms.id_ and mspr.client_type_ = 'TEACHER' )
-                or (ms.payment_type_ like '%VIP%' and  EXISTS(select 1 from teacher t1 where t1.user_id_ = t.user_id_ and t1.membership_end_time_ > now()))
+                or (ms.payment_type_ like '%VIP%' and  #{param.vipFlag} = 1)
                 )
             </if>
         </where>

+ 6 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -17,6 +17,7 @@
         <result column="sales_end_date_" jdbcType="TIMESTAMP" property="salesEndDate"/>
         <result column="background_pic_" jdbcType="VARCHAR" property="backgroundPic"/>
         <result column="mix_student_num_" jdbcType="INTEGER" property="mixStudentNum"/>
+        <result column="max_student_num_" jdbcType="INTEGER" property="maxStudentNum"/>
         <result column="course_start_time_" jdbcType="TIMESTAMP" property="courseStartTime"/>
         <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
         <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
@@ -32,7 +33,7 @@
         id_
         , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
         complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_,
-        sales_end_date_, background_pic_, mix_student_num_,pre_student_num_, im_group_id_,
+        sales_end_date_, background_pic_, mix_student_num_,max_student_num_,pre_student_num_, im_group_id_,
         course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_
     </sql>
 
@@ -40,12 +41,12 @@
             parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
         insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
         complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
-        mix_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
+        mix_student_num_,max_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
             #{entity.courseNum}, #{entity.completeCourseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
-            #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
+            #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},#{entity.maxStudentNum},
             #{entity.preStudentNum},#{entity.imGroupId},#{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
             #{entity.updatedTime},#{entity.reason},#{entity.coursePlan})
         </foreach>
@@ -69,6 +70,7 @@
         b.sales_start_date_           as salesStartDate,
         b.sales_end_date_             as salesEndDate,
         b.mix_student_num_            as mixStudentNum,
+        b.max_student_num_            as maxStudentNum,
         b.im_group_id_              as imGroupId,
         b.reason_ as                   reason,
         b.course_plan_ as coursePlan,
@@ -118,6 +120,7 @@
                         b.sales_start_date_           as salesStartDate,
                         b.sales_end_date_             as salesEndDate,
                         b.mix_student_num_            as mixStudentNum,
+                        b.max_student_num_            as maxStudentNum,
                         b.im_group_id_                as imGroupId,
                         b.reason_ as                   reason,
                         b.course_plan_ as coursePlan,

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -206,7 +206,7 @@
             cs.status_ AS `status`,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName,
-            g.name_ AS courseGroupName,
+            concat(cg.name_,'-第',cs.class_num_,'课') as courseGroupName,
             u.del_flag_ as delFlag,
             p.course_id_ AS courseId,
             p.course_group_id_ AS courseGoupId,

+ 2 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRepliedMapper.xml

@@ -125,6 +125,7 @@
             r.course_group_id_ AS courseGroupId,
             r.score_ AS score,
             r.student_replied_ AS studentRepliedStr,
+            concat(g.name_,'-第',s.class_num_,'课') as courseGroupName,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName,
             s.class_date_ AS classDate,
@@ -166,7 +167,7 @@
             s.start_time_ AS startTime,
             s.end_time_ AS endTime,
             s.status_ AS status,
-
+            concat(g.name_,'-第',s.class_num_,'课') as courseGroupName,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName
         FROM course_schedule_replied t

+ 4 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml

@@ -722,10 +722,10 @@
         ,ms.music_price_ as musicPrice
         ,ms.create_time_ as createTime
         ,ms.audit_status_ as auditStatus
-        ,su.username_ as auditName
+<!--        ,su.username_ as auditName-->
         from music_sheet ms
-        left join music_sheet_auth_record msar on ms.id_ = msar.music_sheet_id_
-        left join sys_user su on msar.verify_user_id_ = su.id_
+<!--        left join music_sheet_auth_record msar on ms.id_ = msar.music_sheet_id_-->
+<!--        left join sys_user su on msar.verify_user_id_ = su.id_-->
         <where>
             <if test="param.idAndName != null and param.idAndName != ''">
                 and (ms.id_ like concat('%',#{param.idAndName} ,'%')
@@ -734,6 +734,7 @@
             </if>
             <if test="param.teacherId != null">
                 and ms.create_by_ = #{param.teacherId} and ms.source_type_ = 'TEACHER'
+                and ms.audit_status_ = 'PASS'
             </if>
             <if test="param.startTime != null">
                 and ms.create_time_ &gt; #{param.startTime}

+ 37 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantAlbumMusicMapper.xml

@@ -62,6 +62,43 @@
         </where>
         order by t.sort_number_
 	</select>
+    <select id="selectPageSimple" resultType="com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper$MusicSheetSimpleDto">
+		SELECT
+        m.id_ as id,
+        m.cbs_music_sheet_id_ as cbsMusicSheetId
+		FROM music_sheet m
+        left join tenant_album_music t on t.music_sheet_id_ = m.id_
+        <where>
+            find_in_set('TENANT',m.provider_type_) and
+            m.tenant_state_ = true and m.tenant_del_flag_ = 0 and t.del_flag_ = 0 AND m.cbs_music_sheet_id_ IS NOT NULL
+            <if test="param.subjectId != null" >
+                and (find_in_set(#{param.subjectId},m.music_subject_) or m.music_subject_ is null or m.music_subject_ = '' OR m.is_all_subject_)
+            </if>
+            <if test="param.subjectType != null">
+                and t.subject_type_ = #{param.subjectType}
+            </if>
+            <if test="param.level != null and param.level != ''">
+                and t.level_ = #{param.level}
+            </if>
+            <if test="param.type != null and param.type != ''">
+                and t.type_ = #{param.type}
+            </if>
+            <if test="param.albumId != null">
+                and t.tenant_album_id_ = #{param.albumId}
+            </if>
+            <if test="param.categoryIds != null and param.categoryIds.size() != 0">
+                and m.tenant_category_id_ in
+                <foreach collection="param.categoryIds" item="item" index="index" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+
+            <if test="param.keyword != null and param.keyword != ''">
+                and m.music_sheet_name_ LIKE CONCAT('%',#{param.keyword},'%')
+            </if>
+        </where>
+        order by t.sort_number_
+	</select>
     <select id="selectMusicSheetIds" resultType="java.lang.Long">
         select
         t.music_sheet_id_

+ 1 - 1
pom.xml

@@ -23,7 +23,7 @@
 		<google.zxing.version>3.4.0</google.zxing.version>
 		<redisson.version>3.11.5</redisson.version>
 		<maven.test.skip>true</maven.test.skip>
-		<cbs.version>1.0.23</cbs.version>
+		<cbs.version>1.0.27</cbs.version>
 		<microsvc.version>1.1.4</microsvc.version>
 	</properties>