|
@@ -402,6 +402,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
}
|
|
|
MusicSheetDetailVo detailVo = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetDetailVo.class);
|
|
|
this.initMusicSheetDetailVo(detailVo,musicSheet,sourceTypeEnum);
|
|
|
+ detailVo.setProviderType(musicSheet.getProviderType());
|
|
|
return detailVo;
|
|
|
}
|
|
|
|
|
@@ -619,9 +620,13 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
}
|
|
|
}
|
|
|
MusicSheetDetailVo detail ;
|
|
|
- if (sysUser == null) {
|
|
|
+ if (sysUser == null || userType == ClientEnum.SYSTEM) {
|
|
|
|
|
|
- detail = this.getCbsDetail(Long.parseLong(id),SourceTypeEnum.PLATFORM);
|
|
|
+ try {
|
|
|
+ detail = this.getCbsDetail(Long.parseLong(id),SourceTypeEnum.PLATFORM);
|
|
|
+ } catch (Exception e) {
|
|
|
+ detail = this.getCbsDetail(Long.parseLong(id),SourceTypeEnum.TENANT);
|
|
|
+ }
|
|
|
} else
|
|
|
if (StringUtil.isEmpty(tenantAlbumId)) {
|
|
|
|
|
@@ -659,7 +664,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
// 设置收藏人数
|
|
|
detail.setFavoriteCount(detail.getFavoriteCount() + detail.getVirtualNumber());
|
|
|
|
|
|
- if (sysUser == null) {
|
|
|
+ if (sysUser == null || userType == ClientEnum.SYSTEM) {
|
|
|
return detail;
|
|
|
}
|
|
|
|
|
@@ -709,7 +714,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
} else {
|
|
|
// 老师所在机构启用的专辑
|
|
|
Teacher teacher = teacherService.getById(sysUser.getId());
|
|
|
- if (teacher.getTenantId() != null) {
|
|
|
+ if (teacher.getTenantId() >0) {
|
|
|
List<Long> musicSheetIds = tenantAlbumMusicService.getMusicIdsByTenantIds(teacher.getTenantId());
|
|
|
if (musicSheetIds.contains(detail.getId())) {
|
|
|
detail.setPlay(YesOrNoEnum.YES);
|
|
@@ -721,6 +726,11 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
|
|
|
platformMusicUseCheck(sysUser, userType, detail);
|
|
|
}
|
|
|
}
|
|
|
+ }else {
|
|
|
+ if (!detail.getProviderType().contains(SourceTypeEnum.PLATFORM.getCode())) {
|
|
|
+ return detail;
|
|
|
+ }
|
|
|
+ platformMusicUseCheck(sysUser, userType, detail);
|
|
|
}
|
|
|
} else {
|
|
|
if (!detail.getProviderType().contains(SourceTypeEnum.PLATFORM.getCode())) {
|