|
@@ -96,7 +96,7 @@ public class CopyDataConsumer extends Consumer<CopyDataDto> {
|
|
try {
|
|
try {
|
|
this.dealQuestionAudios(detailMaps, user.getDisplayName());
|
|
this.dealQuestionAudios(detailMaps, user.getDisplayName());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw new StatusException("复制音频失败!");
|
|
|
|
|
|
+ throw new StatusException("500","复制音频失败!",e);
|
|
}
|
|
}
|
|
|
|
|
|
//复制原试卷的信息
|
|
//复制原试卷的信息
|
|
@@ -107,7 +107,7 @@ public class CopyDataConsumer extends Consumer<CopyDataDto> {
|
|
//保存新试卷的所有试题信息
|
|
//保存新试卷的所有试题信息
|
|
this.savePaperDetails(detailMaps, newPaper, user);
|
|
this.savePaperDetails(detailMaps, newPaper, user);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw new StatusException("克隆试卷失败!");
|
|
|
|
|
|
+ throw new StatusException("500","克隆试卷失败!",e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -203,7 +203,7 @@ public class CopyDataConsumer extends Consumer<CopyDataDto> {
|
|
*/
|
|
*/
|
|
private void dealQuestionAudios(Map<PaperDetail, List<PaperDetailUnit>> detailMaps, String userName){
|
|
private void dealQuestionAudios(Map<PaperDetail, List<PaperDetailUnit>> detailMaps, String userName){
|
|
// UpYun upYun = upYunService.getInstance();
|
|
// UpYun upYun = upYunService.getInstance();
|
|
- String copyAudioPath = UpYunService.TEMP_FILE_EXP + File.separator + userName + "_copyAudioPath";
|
|
|
|
|
|
+ String copyAudioPath = UpYunService.TEMP_FILE_EXP + File.separator + randomUUID();
|
|
File copyAudioDir = new File(copyAudioPath);
|
|
File copyAudioDir = new File(copyAudioPath);
|
|
if (!copyAudioDir.exists()) {
|
|
if (!copyAudioDir.exists()) {
|
|
copyAudioDir.mkdirs();
|
|
copyAudioDir.mkdirs();
|