Quellcode durchsuchen

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

# Conflicts:
#	pom.xml
zouxuan vor 1 Monat
Ursprung
Commit
071175b915

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CourseScheduleStudentMusicSheetResult.java

@@ -17,4 +17,16 @@ public class CourseScheduleStudentMusicSheetResult extends CourseScheduleStudent
 
     @ApiModelProperty(value = "伴奏音量")
     private Integer soundVolume = 100;
+
+    @ApiModelProperty("是否支持混音节拍器")
+    private Boolean isMixBeat;
+
+    @ApiModelProperty("五线谱PDF文件")
+    private String musicPdfUrl;
+
+    @ApiModelProperty("首调PDF文件")
+    private String firstPdfUrl;
+
+    @ApiModelProperty("固定调PDF文件")
+    private String jianPdfUrl;
 }

+ 40 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheet.java

@@ -316,6 +316,46 @@ public class MusicSheet implements Serializable {
     @ApiModelProperty(value = "机构曲目同步上传时间")
     private Date uploadTime;  //上传时间
 
+	@ApiModelProperty("是否支持混音节拍器")
+	@TableField(exist = false)
+	private Boolean isMixBeat;
+
+	@ApiModelProperty("总谱五线谱PDF文件")
+	@TableField(exist = false)
+	private String musicPdfUrl;
+
+	@ApiModelProperty("总谱首调PDF文件")
+	@TableField(exist = false)
+	private String firstPdfUrl;
+
+	@ApiModelProperty("总谱固定调PDF文件")
+	@TableField(exist = false)
+	private String jianPdfUrl;
+
+	@ApiModelProperty("原音五线谱PDF文件")
+	@TableField(exist = false)
+	private String soundMusicPdfUrl;
+
+	@ApiModelProperty("原音首调PDF文件")
+	@TableField(exist = false)
+	private String soundFirstPdfUrl;
+
+	@ApiModelProperty("原音固定调PDF文件")
+	@TableField(exist = false)
+	private String soundJianPdfUrl;
+
+	@ApiModelProperty("伴奏五线谱PDF文件")
+	@TableField(exist = false)
+	private String accMusicPdfUrl;
+
+	@ApiModelProperty("伴奏首调PDF文件")
+	@TableField(exist = false)
+	private String accFirstPdfUrl;
+
+	@ApiModelProperty("伴奏固定调PDF文件")
+	@TableField(exist = false)
+	private String accJianPdfUrl;
+
 	public ChargeTypeEnum getChargeType() {
 		if (Objects.isNull(this.chargeType) && StringUtils.isNotEmpty(getPaymentType())) {
 

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheetAccompaniment.java

@@ -66,6 +66,18 @@ public class MusicSheetAccompaniment extends BaseEntity {
     @ApiModelProperty(value = "速度")
     private String speed;  //速度
 
+    @ApiModelProperty("五线谱PDF文件")
+    @TableField(exist = false)
+    private String musicPdfUrl;
+
+    @ApiModelProperty("首调PDF文件")
+    @TableField(exist = false)
+    private String firstPdfUrl;
+
+    @ApiModelProperty("固定调PDF文件")
+    @TableField(exist = false)
+    private String jianPdfUrl;
+
     @TableField("create_time_")
     @ApiModelProperty(value = "创建时间")
     private java.util.Date createTime;  //创建时间

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

@@ -84,16 +84,27 @@ public class CourseCoursewareServiceImpl extends ServiceImpl<CourseCoursewareDao
                     record.setPaymentType(sheetApplication.getPaymentType());
                     record.setStatus(sheetApplication.getStatus()?YesOrNoEnum.YES:YesOrNoEnum.NO);
                     record.setMusicStatus(sheetApplication.getStatus()?YesOrNoEnum.YES:YesOrNoEnum.NO);
+                    record.setIsMixBeat(sheetApplication.getIsMixBeat());
+                    record.setMusicPdfUrl(sheetApplication.getMusicPdfUrl());
+                    record.setFirstPdfUrl(sheetApplication.getFirstPdfUrl());
+                    record.setJianPdfUrl(sheetApplication.getJianPdfUrl());
                     List<CbsMusicSheetWrapper.MusicSheetAccompaniment> accompanimentList = sheetApplication.getMusicSheetAccompanimentList();
                     if(CollectionUtils.isNotEmpty(accompanimentList)){
                         CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment = accompanimentList.get(0);
                         record.setUrl(accompaniment.getAudioFileUrl());
+                        record.setAccMusicPdfUrl(accompaniment.getMusicPdfUrl());
+                        record.setAccFirstPdfUrl(accompaniment.getFirstPdfUrl());
+                        record.setAccJianPdfUrl(accompaniment.getJianPdfUrl());
                     }
                     List<CbsMusicSheetWrapper.MusicSheetSound> soundList = sheetApplication.getMusicSheetSoundList();
                     if(CollectionUtils.isNotEmpty(soundList)){
-                        record.setMusicSheetAccompanimentId(soundList.get(0).getId().toString());
+                        CbsMusicSheetWrapper.MusicSheetSound sheetSound = soundList.get(0);
+                        record.setMusicSheetAccompanimentId(sheetSound.getId().toString());
                         String url = soundList.stream().map(CbsMusicSheetWrapper.MusicSheetSound::getAudioFileUrl).collect(Collectors.joining(","));
                         record.setMp3url(url);
+                        record.setSoundMusicPdfUrl(sheetSound.getMusicPdfUrl());
+                        record.setSoundFirstPdfUrl(sheetSound.getFirstPdfUrl());
+                        record.setSoundJianPdfUrl(sheetSound.getJianPdfUrl());
                     }
                 }
             }

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

@@ -204,6 +204,10 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
             //管乐迷的历史问题,原音和伴奏反过来
             studentMusicScore.setMp3Url(sheetApplication.getUrl());
             studentMusicScore.setUrl(sheetApplication.getMp3Url());
+            studentMusicScore.setMusicPdfUrl(sheetApplication.getMusicPdfUrl());
+            studentMusicScore.setFirstPdfUrl(sheetApplication.getFirstPdfUrl());
+            studentMusicScore.setJianPdfUrl(sheetApplication.getJianPdfUrl());
+            studentMusicScore.setIsMixBeat(sheetApplication.getIsMixBeat());
             result.add(studentMusicScore);
         }
         return result;

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

@@ -464,9 +464,17 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         detailVo.setMusicImg(musicSheet1.getMusicImg());
         detailVo.setTitleImg(musicSheet1.getMusicCover());
         detailVo.setPlaySpeed(musicSheet1.getPlaySpeed());
+        detailVo.setIsMixBeat(musicSheet1.getIsMixBeat());
+        detailVo.setMusicPdfUrl(musicSheet1.getMusicPdfUrl());
+        detailVo.setFirstPdfUrl(musicSheet1.getFirstPdfUrl());
+        detailVo.setJianPdfUrl(musicSheet1.getJianPdfUrl());
         List<CbsMusicSheetWrapper.MusicSheetAccompaniment> accompanimentList = musicSheet1.getMusicSheetAccompanimentList();
         if (CollectionUtils.isNotEmpty(accompanimentList)) {
-            detailVo.setMetronomeUrl(accompanimentList.get(0).getAudioFileUrl());
+            CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment = accompanimentList.get(0);
+            detailVo.setMetronomeUrl(accompaniment.getAudioFileUrl());
+            detailVo.setAccMusicPdfUrl(accompaniment.getMusicPdfUrl());
+            detailVo.setAccFirstPdfUrl(accompaniment.getFirstPdfUrl());
+            detailVo.setAccJianPdfUrl(accompaniment.getJianPdfUrl());
         }
         detailVo.setXmlFileUrl(musicSheet1.getXmlFileUrl());
         detailVo.setMidiUrl(musicSheet1.getMidiFileUrl());
@@ -488,6 +496,9 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                 accompaniment.setSortNumber(sound.getSortNumber());
                 accompaniment.setTrack(sound.getTrack());
                 accompaniment.setMusicalInstrumentId(sound.getMusicalInstrumentId());
+                accompaniment.setMusicPdfUrl(sound.getMusicPdfUrl());
+                accompaniment.setFirstPdfUrl(sound.getFirstPdfUrl());
+                accompaniment.setJianPdfUrl(sound.getJianPdfUrl());
                 background.add(accompaniment);
             }
             //按照sortNumber排序
@@ -570,8 +581,12 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         }
         sheet.setMusicPrice(musicSheetApplication.getMusicPrice());
         if (CollectionUtils.isNotEmpty(musicSheetApplication.getMusicSheetAccompanimentList())) {
-            sheet.setAudioFileUrl(musicSheetApplication.getMusicSheetAccompanimentList().get(0).getAudioFileUrl());
-            sheet.setMetronomeUrl(musicSheetApplication.getMusicSheetAccompanimentList().get(0).getAudioFileUrl());
+            CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment = musicSheetApplication.getMusicSheetAccompanimentList().get(0);
+            sheet.setAudioFileUrl(accompaniment.getAudioFileUrl());
+            sheet.setMetronomeUrl(accompaniment.getAudioFileUrl());
+            sheet.setAccMusicPdfUrl(accompaniment.getMusicPdfUrl());
+            sheet.setAccFirstPdfUrl(accompaniment.getFirstPdfUrl());
+            sheet.setAccJianPdfUrl(accompaniment.getJianPdfUrl());
         }
         sheet.setXmlFileUrl(musicSheetApplication.getXmlFileUrl());
         sheet.setMidiUrl(musicSheetApplication.getMidiFileUrl());
@@ -592,10 +607,6 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         if(musicSheetApplication.getMusicSheetExtend() != null){
             sheet.setAddName(musicSheetApplication.getMusicSheetExtend().getUserName());
         }
-        List<CbsMusicSheetWrapper.MusicSheetAccompaniment> accompanimentList = musicSheetApplication.getMusicSheetAccompanimentList();
-        if (CollectionUtils.isNotEmpty(accompanimentList)){
-            sheet.setMetronomeUrl(accompanimentList.get(0).getAudioFileUrl());
-        }
     }
 
     @Override
@@ -908,7 +919,11 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         record.setMusicTagNames(musicSheetApplication.getMusicTagNames());
         List<CbsMusicSheetWrapper.MusicSheetAccompaniment> accompanimentList = musicSheetApplication.getMusicSheetAccompanimentList();
         if (CollectionUtils.isNotEmpty(accompanimentList)) {
-            record.setMetronomeUrl(accompanimentList.get(0).getAudioFileUrl());
+            CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment = accompanimentList.get(0);
+            record.setMetronomeUrl(accompaniment.getAudioFileUrl());
+            record.setAccMusicPdfUrl(accompaniment.getMusicPdfUrl());
+            record.setAccFirstPdfUrl(accompaniment.getFirstPdfUrl());
+            record.setAccJianPdfUrl(accompaniment.getJianPdfUrl());
         }
         record.setXmlFileUrl(musicSheetApplication.getXmlFileUrl());
         record.setMidiUrl(musicSheetApplication.getMidiFileUrl());
@@ -1661,10 +1676,6 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         if (CollectionUtils.isEmpty(rows)){
             throw new BizException("查询曲谱信息失败");
         }
-//        List<Subject> subjects = subjectService.getDao().getByCbsSubjectIds(rows.stream().map(CbsMusicSheetWrapper.MusicSheetApplication::getSubjectIds).
-//                filter(StringUtils::isNotEmpty).collect(Collectors.joining(",")));
-//        Map<Long, String> subjectMap = subjects.stream().collect(Collectors.toMap(Subject::getCbsSubjectId, Subject::getName));
-
         Map<Long,CbsMusicSheetWrapper.MusicSheetApplication> musicSheetMap =
                 rows.stream().collect(Collectors.toMap(CbsMusicSheetWrapper.MusicSheetApplication::getId, Function.identity()));
         for (MusicSheetDetailVo record : sheetDetailVos) {
@@ -1696,6 +1707,9 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                 for (CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment : accompanimentList) {
                     MusicSheetAccompaniment musicSheetAccompaniment = new MusicSheetAccompaniment();
                     musicSheetAccompaniment.setAudioFileUrl(accompaniment.getAudioFileUrl());
+                    musicSheetAccompaniment.setMusicPdfUrl(accompaniment.getMusicPdfUrl());
+                    musicSheetAccompaniment.setFirstPdfUrl(accompaniment.getFirstPdfUrl());
+                    musicSheetAccompaniment.setJianPdfUrl(accompaniment.getJianPdfUrl());
                     background.add(musicSheetAccompaniment);
                 }
             }

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

@@ -157,6 +157,10 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
                     m.setMusicImg(sheetApplication.getMusicImg());
                     m.setFirstTone(sheetApplication.getMusicFirstImg());
                     m.setFixedTone(sheetApplication.getMusicJianImg());
+                    m.setIsMixBeat(sheetApplication.getIsMixBeat());
+                    m.setMusicPdfUrl(sheetApplication.getMusicPdfUrl());
+                    m.setFirstPdfUrl(sheetApplication.getFirstPdfUrl());
+                    m.setJianPdfUrl(sheetApplication.getJianPdfUrl());
 
                     // 设置曲目原音
                     List<CbsMusicSheetWrapper.MusicSheetSound> soundList = sheetApplication.getMusicSheetSoundList();
@@ -169,6 +173,9 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
                             accompaniment.setSortNumber(sound.getSortNumber());
                             accompaniment.setTrack(sound.getTrack());
                             accompaniment.setMusicalInstrumentId(sound.getMusicalInstrumentId());
+                            accompaniment.setMusicPdfUrl(sound.getMusicPdfUrl());
+                            accompaniment.setFirstPdfUrl(sound.getFirstPdfUrl());
+                            accompaniment.setJianPdfUrl(sound.getJianPdfUrl());
                             background.add(accompaniment);
                         }
                         m.setBackground(background);

+ 30 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCoursewareVo.java

@@ -41,4 +41,34 @@ public class CourseCoursewareVo extends CourseCourseware{
 
 	@ApiModelProperty("曲目编号")
 	private String cbsMusicSheetId;
+
+	@ApiModelProperty("是否支持混音节拍器")
+	private Boolean isMixBeat;
+
+	@ApiModelProperty("总谱五线谱PDF文件")
+	private String musicPdfUrl;
+
+	@ApiModelProperty("总谱首调PDF文件")
+	private String firstPdfUrl;
+
+	@ApiModelProperty("总谱固定调PDF文件")
+	private String jianPdfUrl;
+
+	@ApiModelProperty("原音五线谱PDF文件")
+	private String soundMusicPdfUrl;
+
+	@ApiModelProperty("原音首调PDF文件")
+	private String soundFirstPdfUrl;
+
+	@ApiModelProperty("原音固定调PDF文件")
+	private String soundJianPdfUrl;
+
+	@ApiModelProperty("伴奏五线谱PDF文件")
+	private String accMusicPdfUrl;
+
+	@ApiModelProperty("伴奏首调PDF文件")
+	private String accFirstPdfUrl;
+
+	@ApiModelProperty("伴奏固定调PDF文件")
+	private String accJianPdfUrl;
 }

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

@@ -275,6 +275,18 @@ public class TenantAlbumMusicWrapper {
         @ApiModelProperty("单元测验数量")
         private Integer unitTestNum;
 
+        @ApiModelProperty("是否支持混音节拍器")
+        private Boolean isMixBeat;
+
+        @ApiModelProperty("总谱五线谱PDF文件")
+        private String musicPdfUrl;
+
+        @ApiModelProperty("总谱首调PDF文件")
+        private String firstPdfUrl;
+
+        @ApiModelProperty("总谱固定调PDF文件")
+        private String jianPdfUrl;
+
         @ApiModelProperty("曲谱伴奏")
         private List<MusicSheetAccompaniment> background;
 

+ 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.15</cbs.version>
+		<cbs.version>1.0.16</cbs.version>
 		<microsvc.version>1.0.8-RC1</microsvc.version>
 	</properties>