ソースを参照

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

zouxuan 1 年間 前
コミット
8c5108fe75

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

@@ -157,7 +157,7 @@ public class MusicSheetController extends BaseController {
 
     @PostMapping("/state/{id}")
     @ApiOperation(value = "启用/停用", notes = "传入id")
-    public HttpResponseResult<Boolean> state(@ApiParam(value = "曲目编号", required = true)  @PathVariable Long id, @RequestBody ReasonDto reasonDto) {
+    public HttpResponseResult<Boolean> state(@ApiParam(value = "曲目编号", required = true)  @PathVariable Long id) {
         if (StringUtil.isEmpty(id)) {
             return failed("参数不能为空");
         }

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

@@ -483,6 +483,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                 accompaniment.setAudioFileUrl(sound.getAudioFileUrl());
                 accompaniment.setSortNumber(sound.getSortNumber());
                 accompaniment.setTrack(sound.getTrack());
+                accompaniment.setMusicalInstrumentId(sound.getMusicalInstrumentId());
                 background.add(accompaniment);
             }
             //按照sortNumber排序

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

@@ -311,11 +311,10 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         }
 
         // 声部
-        List<Long> subjectIds = musicSheets.stream()
+        String subjectIds = musicSheets.stream()
                 .map(MusicSheet::getMusicSubject)
-                .filter(StringUtils::isNotBlank).distinct()
-                .map(Long::parseLong).collect(Collectors.toList());
-        if (CollectionUtils.isNotEmpty(subjectIds)) {
+                .filter(StringUtils::isNotBlank).collect(Collectors.joining(","));
+        if (StringUtils.isNotEmpty(subjectIds)) {
             List<Subject> subjects = subjectService.findBySubjectByIdList(subjectIds);
             data.setSubjects(subjects);
         }

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

@@ -118,9 +118,7 @@
             CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
                 WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER'
                 ELSE 'TENANT' END,
-            CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
-                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER'
-                ELSE 'TENANT' END,
+            CASE WHEN #{item.availableType} = 'PLATFORM' THEN 'PLATFORM' ELSE 'TENANT' END,
             #{item.musicSheetUpdate.playMode},
             #{item.musicSheetUpdate.showFingering},
             #{item.musicSheetUpdate.canEvaluate},
@@ -140,6 +138,7 @@
             left join music_sheet_auth_record msar ON msar.music_sheet_id_ = t.id_
         </if>
         <where>
+            1=1
             <include refid="QueryInfo"/>
             <if test="param.auditStatus == null">
                 AND t.cbs_music_sheet_id_ IS NOT NULL
@@ -421,6 +420,7 @@
             left join music_sheet_auth_record msar ON msar.music_sheet_id_ = t.id_
         </if>
         <where>
+            1=1
             <include refid="QueryInfo"/>
             <if test="param.auditVersion != null ">
                 and #{param.auditVersion} = t.audit_version_
@@ -464,6 +464,7 @@
             left join music_sheet_auth_record msar ON msar.music_sheet_id_ = t.id_
         </if>
         <where>
+            1=1
             <include refid="QueryInfo"/>
             <if test="param.studentId != null">
                 and mspr.student_id_ = #{param.studentId}
@@ -498,6 +499,7 @@
             left join music_sheet_auth_record msar ON msar.music_sheet_id_ = t.id_
         </if>
         <where>
+            1=1
             <include refid="QueryInfo"/>
             <if test="clientType != null">
                 AND mf.client_type_ = #{clientType}
@@ -525,6 +527,7 @@
         left join sys_user su on t.create_by_ = su.id_
         left join music_favorite mf on (t.id_ = mf.music_sheet_id_ and mspr.user_id_ = mf.user_id_ <if test="param.clientType != null"> AND mf.client_type_ = #{param.clientType}</if> )
         <where>
+            1=1
             <include refid="QueryInfo"/>
             <if test="practiceMusicIdList != null and practiceMusicIdList.size() != 0">
                 and mspr.id_ in
@@ -846,7 +849,8 @@
             ms.music_price_ = #{item.musicPrice},ms.top_flag_ = #{item.topFlag},
             ms.exquisite_flag_ = #{item.exquisiteFlag},ms.sort_number_ = #{item.sortNo},ms.del_flag_ = 0,
             ms.audit_status_ = 'PASS',
-            ms.state_ = #{item.status}
+            ms.state_ = #{item.status},
+            ms.provider_type_ = CASE WHEN #{item.availableType} = 'PLATFORM' THEN 'PLATFORM' ELSE 'TENANT' END
             <if test="item.musicSheetUpdate != null">
                 ,ms.music_sheet_name_ = #{item.musicSheetUpdate.name},
                 ms.music_subject_ = #{item.musicSheetUpdate.subjectIds},
@@ -862,11 +866,7 @@
                 ms.show_fingering_ = #{item.musicSheetUpdate.showFingering},
                 ms.can_evaluate_ = #{item.musicSheetUpdate.canEvaluate},
                 ms.source_type_ = CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
-                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER'
-                ELSE 'TENANT' END,
-                ms.provider_type_ = CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
-                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER'
-                ELSE 'TENANT' END
+                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER' ELSE 'TENANT' END
             </if>
             where ms.cbs_music_sheet_id_ = #{item.musicSheetId}
         </foreach>