|
|
@@ -113,6 +113,13 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
|
|
|
public IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> selectPage(IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page,
|
|
|
TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
|
|
|
List<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> musicSheets = new ArrayList<>();
|
|
|
+ //查询购买了哪些专辑权限
|
|
|
+ if(query.getClientType() == ClientEnum.TEACHER) {
|
|
|
+ // 判断是否还在生效中
|
|
|
+ List<UserTenantAlbumRecord> albumRecordList = userTenantAlbumRecordService.getUseAlbumByUserId(query.getUserId(), query.getClientType());
|
|
|
+ List<Long> tenantAlbumIdList = albumRecordList.stream().map(UserTenantAlbumRecord :: getTenantAlbumId).collect(Collectors.toList());
|
|
|
+ query.setTenantAlbumIdList(tenantAlbumIdList);
|
|
|
+ }
|
|
|
if (query.getSubjectType() != SubjectTypeEnum.COURSEWARE) {
|
|
|
|
|
|
musicSheets = tenantAlbumMusicMapper.selectPage(page, query);
|