|
@@ -45,6 +45,9 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
MaterialMouldService materialMouldService; |
|
|
MaterialMouldService materialMouldService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
VoiceInfoService voiceInfoService; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
VideoFactory videoFactory; |
|
|
VideoFactory videoFactory; |
|
|
|
|
|
|
|
@@ -86,13 +89,14 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
if(record.getVoiceMouldId() == null){ |
|
|
if(record.getVoiceMouldId() == null){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未选择声音模板信息"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未选择声音模板信息"); |
|
|
} |
|
|
} |
|
|
VoiceMould voiceMould = voiceMouldService.getById(record.getVoiceMouldId()); |
|
|
|
|
|
|
|
|
VoiceInfo voiceMould = voiceInfoService.getById(record.getVoiceMouldId()); |
|
|
|
|
|
// VoiceMould voiceMould = voiceMouldService.getById(record.getVoiceMouldId()); |
|
|
if(voiceMould == null){ |
|
|
if(voiceMould == null){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到声音模板信息"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到声音模板信息"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
JSONObject voiceMouldObject = new JSONObject(); |
|
|
JSONObject voiceMouldObject = new JSONObject(); |
|
|
voiceMouldObject.put("title",voiceMould.getTitle()); |
|
|
|
|
|
|
|
|
voiceMouldObject.put("title",voiceMould.getLocalName()); |
|
|
voiceMouldObject.put("mouldSmId",voiceMould.getMouldSmId()); |
|
|
voiceMouldObject.put("mouldSmId",voiceMould.getMouldSmId()); |
|
|
voiceMouldObject.put("personType",0); |
|
|
voiceMouldObject.put("personType",0); |
|
|
voiceMouldObject.put("personTypeStr","默认"); |
|
|
voiceMouldObject.put("personTypeStr","默认"); |
|
@@ -101,7 +105,7 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
if(StringUtils.isNotBlank(record.getSpeakTypeStr())){ |
|
|
if(StringUtils.isNotBlank(record.getSpeakTypeStr())){ |
|
|
EnumSpeakType speakType = EnumSpeakType.getEnum(record.getSpeakTypeStr()); |
|
|
EnumSpeakType speakType = EnumSpeakType.getEnum(record.getSpeakTypeStr()); |
|
|
if(speakType == null){ |
|
|
if(speakType == null){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到声音类型信息"); |
|
|
|
|
|
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"声音类型信息错误"); |
|
|
} |
|
|
} |
|
|
voiceMouldObject.put("speakType",speakType.getCode()); |
|
|
voiceMouldObject.put("speakType",speakType.getCode()); |
|
|
voiceMouldObject.put("speakTypeStr",speakType.getMessage()); |
|
|
voiceMouldObject.put("speakTypeStr",speakType.getMessage()); |
|
@@ -115,6 +119,7 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
if(voiceMaterial == null){ |
|
|
if(voiceMaterial == null){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到声音文件"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到声音文件"); |
|
|
} |
|
|
} |
|
|
|
|
|
voiceMaterialService.handVideoUrl(voiceMaterial); |
|
|
record.setVoiceMaterialUrl(voiceMaterial.getMaterial()); |
|
|
record.setVoiceMaterialUrl(voiceMaterial.getMaterial()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -183,6 +188,12 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
} |
|
|
} |
|
|
}else if(EnumVoiceFrom.FROM_UPD.getCode().equals(voiceFrom)){ |
|
|
}else if(EnumVoiceFrom.FROM_UPD.getCode().equals(voiceFrom)){ |
|
|
voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl(); |
|
|
voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl(); |
|
|
|
|
|
if(StringUtils.isBlank(voiceMaterialUrl)){ |
|
|
|
|
|
VoiceMaterial voiceMaterial = voiceMaterialService.getById(photoSpeakVideo.getVoiceMaterialId()); |
|
|
|
|
|
voiceMaterialService.handVideoUrl(voiceMaterial); |
|
|
|
|
|
voiceMaterialUrl = voiceMaterial.getMaterial(); |
|
|
|
|
|
videoUpd.setVoiceMaterialUrl(voiceMaterialUrl); |
|
|
|
|
|
} |
|
|
if(StringUtils.isBlank(voiceMaterialUrl)){ |
|
|
if(StringUtils.isBlank(voiceMaterialUrl)){ |
|
|
msg = "未找到上传声音文件"; |
|
|
msg = "未找到上传声音文件"; |
|
|
} |
|
|
} |
|
|