Commit a7e30749 authored by luzhuang's avatar luzhuang

替换oss链接https

parent ebebfe2c
......@@ -666,10 +666,6 @@ public class BChapterServiceImpl implements BChapterService {
return null;
// throw new ServiceException(ResultServiceEnums.PARAM_NOT_NULL);
}
if("true".equals(replaceHttp)){
LogUtil.fileChangeLog("----------替换oss链接https----------");
bFile.setVideoUrl(bFile.getVideoUrl().replace("http:","https:"));
}
LogUtil.fileChangeLog("----------文件下载及转换----------");
return changeFile(bFile);
}
......@@ -881,6 +877,10 @@ public class BChapterServiceImpl implements BChapterService {
* @return
*/
public String downLoadFile(BFile bFile, File file, String filePath) {
if("true".equals(replaceHttp)){
LogUtil.fileChangeLog("----------替换oss链接https----------");
bFile.setVideoUrl(bFile.getVideoUrl().replace("http:","https:"));
}
LogUtil.fileChangeLog("****************download + begin***********" + DateFormatUtils.format(new Date(), "HH:mm:ss"));
String name = bFile.getVideoUrl().substring(bFile.getVideoUrl().lastIndexOf("/") + 1);
......
......@@ -473,7 +473,7 @@ public class BLessonServiceImpl implements BLessonService {
if (StringUtils.isNotEmpty(addLessonDTO.getTrainFileJson())) {
List<BTrainFile> bTrainFiles = JSONObject.parseArray(addLessonDTO.getTrainFileJson(), BTrainFile.class);
for(BTrainFile b : bTrainFiles){
if(b.getVideoUrl() != null){
if("true".equals(replaceHttp) && b.getVideoUrl() != null){
LogUtil.fileChangeLog("----------替换oss链接https----------");
b.setVideoUrl(b.getVideoUrl().replace("http:","https:"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment