|
@@ -106,7 +106,11 @@ public class ClonePaperService {
|
|
|
Map<PaperDetail, List<PaperDetailUnit>> detailMaps = this.copyPaperDetails(oldPaper, user, course);
|
|
|
|
|
|
//处理试题的音频(下载上传到云存储)
|
|
|
- this.dealQuestionAudios(detailMaps, user.getDisplayName());
|
|
|
+ try {
|
|
|
+ this.dealQuestionAudios(detailMaps, user.getDisplayName());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new PaperException("复制音频失败!");
|
|
|
+ }
|
|
|
|
|
|
//复制原试卷的信息
|
|
|
Paper newPaper = this.copyPaper(oldPaper, paperName, course, user);
|
|
@@ -252,7 +256,10 @@ public class ClonePaperService {
|
|
|
//定义文件下载名称,并下载音频文件
|
|
|
String newAudioFileName = upYunService.randomUUID() + "_" + audio.getFileName();
|
|
|
File audioFile = new File(copyAudioPath + File.separator + newAudioFileName);
|
|
|
+
|
|
|
+ log.info("-->start readAudioFile:" + newAudioFileName);
|
|
|
upYun.readFile(audio.getFileUrl(), audioFile);
|
|
|
+ log.info("-->end readAudioFile:" + newAudioFileName);
|
|
|
|
|
|
//重新上传新的音频文件
|
|
|
String newPath = sysProperty.getRadioUploadPath() + newAudioFileName;
|