|
@@ -374,6 +374,22 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (query.getId() != null) {
|
|
|
+ List<AlbumMusicRelate> list = albumMusicRelateService.lambdaQuery()
|
|
|
+ .eq(AlbumMusicRelate::getAlbumId, query.getId())
|
|
|
+ .in(AlbumMusicRelate::getMusicSheetId, records.stream().map(MusicSheetVo::getId).collect(Collectors.toList()))
|
|
|
+ .list();
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) {
|
|
|
+ Map<Long, AlbumMusicRelate> collect = list.stream().collect(Collectors.toMap(AlbumMusicRelate::getMusicSheetId, o -> o, (o1, o2) -> o1));
|
|
|
+ for (MusicSheetVo record : records) {
|
|
|
+ AlbumMusicRelate albumMusicRelate = collect.get(record.getId());
|
|
|
+ if (albumMusicRelate != null) {
|
|
|
+ record.setAlbumCategoryLevelId(albumMusicRelate.getAlbumCategoryLevelId());
|
|
|
+ record.setAlbumCategoryTypeId(albumMusicRelate.getAlbumCategoryTypeId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 设置专辑
|
|
|
List<Long> albumCategoryIds = records.stream().flatMap(o -> Lists.newArrayList(o.getAlbumCategoryTypeId(), o.getAlbumCategoryLevelId()).stream())
|