|
@@ -14,12 +14,10 @@ import cn.com.qmth.examcloud.core.questions.base.Model;
|
|
|
import cn.com.qmth.examcloud.core.questions.base.exception.PaperException;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.*;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.*;
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.config.UpYunProperty;
|
|
|
import cn.com.qmth.examcloud.core.questions.service.impl.CourseService;
|
|
|
-
|
|
|
import com.google.common.collect.Lists;
|
|
|
-
|
|
|
import main.java.com.UpYun;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -54,6 +52,8 @@ public class ClonePaperService {
|
|
|
@Autowired
|
|
|
private UpYunService upYunService;
|
|
|
@Autowired
|
|
|
+ private UpYunProperty upYunProperty;
|
|
|
+ @Autowired
|
|
|
private CourseService courseService;
|
|
|
|
|
|
/**
|
|
@@ -244,8 +244,9 @@ public class ClonePaperService {
|
|
|
String newAudioFileName = upYunService.randomUUID() + "_" + audio.getFileName();
|
|
|
File audioFile = new File(copyAudioPath + File.separator + newAudioFileName);
|
|
|
upYun.readFile(audio.getFileUrl(), audioFile);
|
|
|
+
|
|
|
//重新上传新的音频文件
|
|
|
- String newPath = upYunService.getUpYunRadioPath() + newAudioFileName;
|
|
|
+ String newPath = upYunProperty.getRadioUploadPath() + newAudioFileName;
|
|
|
try {
|
|
|
upYun.writeFile(newPath, audioFile, true);
|
|
|
audio.setFileUrl(newPath);//设置新路径
|