|
@@ -113,6 +113,15 @@ public class CbsMusicSheetServiceImpl implements CbsMusicSheetService {
|
|
|
}
|
|
|
|
|
|
public boolean updateMusicSheet(CbsMusicSheetApiWrapper.MusicSheetUpdate musicSheetUpdate) {
|
|
|
+ if(musicSheetUpdate.getMusicSheetType() == EMusicSheetType.CONCERT){
|
|
|
+ musicSheetUpdate.setSubjectIds(null);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(musicSheetUpdate.getSubjectIds())) {
|
|
|
+ List<Subject> subjectIds = subjectService.getDao().getByCbsSubjectIds(musicSheetUpdate.getSubjectIds());
|
|
|
+ if (CollectionUtils.isNotEmpty(subjectIds)) {
|
|
|
+ musicSheetUpdate.setSubjectIds(subjectIds.stream().map(e -> e.getId().toString()).collect(Collectors.joining(",")));
|
|
|
+ }
|
|
|
+ }
|
|
|
musicSheetService.getDao().updateMusicSheet(musicSheetUpdate);
|
|
|
return true;
|
|
|
}
|