|
|
@@ -135,10 +135,13 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
|
voiceMaterialService.handVideoUrl(voiceMaterial); |
|
|
|
record.setVoiceMaterialUrl(voiceMaterial.getMaterial()); |
|
|
|
}else if(EnumVoiceFrom.MUSIC.getCode().equals(record.getVoiceFrom())){ |
|
|
|
if(record.getVoiceMaterialId() == null){ |
|
|
|
if(record.getMusicId() == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未选择音乐文件"); |
|
|
|
} |
|
|
|
MusicInfo musicInfo = musicInfoService.getById(record.getVoiceMaterialId()); |
|
|
|
MusicInfo musicInfo = musicInfoService.getById(record.getMusicId()); |
|
|
|
if (ObjectUtils.isEmpty(musicInfo)){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到音乐文件"); |
|
|
|
} |
|
|
|
record.setVoiceMaterialUrl(musicInfo.getUrl()); |
|
|
|
} |
|
|
|
} |
|
|
@@ -232,8 +235,8 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
|
msg = "未找到上传声音文件"; |
|
|
|
} |
|
|
|
} else if (EnumVoiceFrom.MUSIC.getCode().equals(voiceFrom)) { |
|
|
|
Long materialId = photoSpeakVideo.getVoiceMaterialId(); |
|
|
|
MusicInfo musicInfo = musicInfoService.getById(materialId); |
|
|
|
Long musicId = photoSpeakVideo.getMusicId(); |
|
|
|
MusicInfo musicInfo = musicInfoService.getById(musicId); |
|
|
|
if (ObjectUtils.isEmpty(musicInfo)){ |
|
|
|
msg = "未找到音乐文件"; |
|
|
|
} |
|
|
|