Browse Source

Merge branch 'feature/1210_audio' into test

刘俊驰 7 months ago
parent
commit
b62c1b2784

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

@@ -2783,17 +2783,14 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                         musicSheetDetail.setMusicSheetSoundList(Collections.singletonList(first.get()));
                     }
                 }
-
             }
-            if (CollectionUtils.isEmpty(sheetSoundList)) {
+            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;
     }