Browse Source

酷乐秀曲目来源改为内容平台

zouxuan 1 year ago
parent
commit
3b9531afaa

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

@@ -133,10 +133,10 @@ public class CourseCoursewareServiceImpl extends ServiceImpl<CourseCoursewareDao
                     if(CollectionUtils.isNotEmpty(accompanimentList)){
                         CbsMusicSheetWrapper.MusicSheetAccompaniment accompaniment = accompanimentList.get(0);
                         record.setUrl(accompaniment.getAudioFileUrl());
-                        record.setMusicSheetAccompanimentId(accompaniment.getMusicSheetId().toString());
                     }
                     List<CbsMusicSheetWrapper.MusicSheetSound> soundList = sheetApplication.getMusicSheetSoundList();
                     if(CollectionUtils.isNotEmpty(soundList)){
+                        record.setMusicSheetAccompanimentId(soundList.get(0).getId().toString());
                         String url = soundList.stream().map(CbsMusicSheetWrapper.MusicSheetSound::getAudioFileUrl).collect(Collectors.joining(","));
                         record.setMp3url(url);
                     }

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

@@ -30,14 +30,7 @@
     <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.CourseCoursewareVo">
 		SELECT         
         	<include refid="baseColumns" />
-        ,ms.music_sheet_name_ as musicSheetName
-        ,ms.state_ as musicStatus
-        ,ms.payment_type_ as paymentType
-        ,ms.music_img_ as musicImg
-        ,ms.title_img_ as titleImg
 		,ms.cbs_music_sheet_id_ as cbsMusicSheetId
-		,CASE WHEN ms.audio_file_url_ IS NOT NULL AND ms.audio_file_url_ != '' THEN ms.audio_file_url_
-        WHEN ms.metronome_url_ IS NOT NULL AND ms.metronome_url_ != '' THEN ms.metronome_url_ ELSE ms.url_ END AS url
 		FROM course_courseware t
         left join music_sheet ms on t.music_sheet_id_ = ms.id_
         <where>
@@ -49,7 +42,7 @@
                 and t.client_type_ = #{param.clientType}
             </if>
             <if test="param.idAndName != null and param.idAndName != ''">
-                and  (ms.music_sheet_name_ like '%${param.idAndName}%' or ms.id_ like '%${param.idAndName}%')
+                and  (ms.music_sheet_name_ like '%${param.idAndName}%' or ms.cbs_music_sheet_id_ = '${param.idAndName}')
             </if>
             <if test="param.musicTagIdList != null and param.musicTagIdList.size() != 0">
                 and
@@ -58,10 +51,10 @@
                 </foreach>
             </if>
             <if test="param.subjectIdList != null and param.subjectIdList.size() != 0">
-                and
-                <foreach collection="param.subjectIdList" separator="or" item="item"  open="(" close=")" >
+                and (ms.music_subject_ is null or ms.music_subject_ = '' or ms.music_sheet_type_ = 'CONCERT'
+                <foreach collection="param.subjectIdList" separator="or" item="item" open="(" close=")">
                     find_in_set(#{item},ms.music_subject_)
-                </foreach>
+                </foreach>)
             </if>
             <if test="param.status != null and param.status.code == 1">
                  and (ms.payment_type_ like '%FREE%'