|  | @@ -433,7 +433,10 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
 | 
											
												
													
														|  |      @Transactional(rollbackFor = Exception.class)
 |  |      @Transactional(rollbackFor = Exception.class)
 | 
											
												
													
														|  |      public boolean saveMusicSheet(MusicSheetDto musicSheetDto, Long userId) {
 |  |      public boolean saveMusicSheet(MusicSheetDto musicSheetDto, Long userId) {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        MusicSheet oldMusicSheet = getById(musicSheetDto.getId());
 |  | 
 | 
											
												
													
														|  | 
 |  | +        MusicSheet oldMusicSheet = null;
 | 
											
												
													
														|  | 
 |  | +        if (musicSheetDto.getId() != null) {
 | 
											
												
													
														|  | 
 |  | +            oldMusicSheet = getById(musicSheetDto.getId());
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |          // 保存审核拒绝的数据
 |  |          // 保存审核拒绝的数据
 | 
											
												
													
														|  |          if (musicSheetDto.getId() != null && AuthStatusEnum.DOING.getCode().equals(musicSheetDto.getAuditStatus().getCode())) {
 |  |          if (musicSheetDto.getId() != null && AuthStatusEnum.DOING.getCode().equals(musicSheetDto.getAuditStatus().getCode())) {
 | 
											
												
													
														|  |              // 保存删除的曲目
 |  |              // 保存删除的曲目
 | 
											
										
											
												
													
														|  | @@ -464,7 +467,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          // 删除曲目专辑关联
 |  |          // 删除曲目专辑关联
 | 
											
												
													
														|  | -        if (!oldMusicSheet.getMusicSubject().equals(musicSheetDto.getMusicSubject())) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (oldMusicSheet != null && !oldMusicSheet.getMusicSubject().equals(musicSheetDto.getMusicSubject())) {
 | 
											
												
													
														|  |              delAlbumSheetRef(musicSheetDto.getId(), musicSheetDto.getMusicSubject());
 |  |              delAlbumSheetRef(musicSheetDto.getId(), musicSheetDto.getMusicSubject());
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 |