Merge branch 'zcwy0704-llf' into dev0525

This commit is contained in:
zhaolongfei
2024-07-04 15:37:47 +08:00

View File

@@ -290,14 +290,17 @@ public class CourseFileApi extends ApiBaseController {
if(file.getFileType().equalsIgnoreCase("pdf")) { if(file.getFileType().equalsIgnoreCase("pdf")) {
file.setPreviewFilePath(file.getFilePath()); file.setPreviewFilePath(file.getFilePath());
file.setDuration(file.getDuration()*60);
file.setConverStatus(0);//代表不需要转化 file.setConverStatus(0);//代表不需要转化
}else if ("doc,xls,ppt,docx,xlsx,pptx".indexOf(file.getFileType().toLowerCase()) > -1) { }else if ("doc,xls,ppt,docx,xlsx,pptx".indexOf(file.getFileType().toLowerCase()) > -1) {
file.setConverStatus(1);//转化中 file.setConverStatus(1);//转化中
file.setDuration(file.getDuration()*60);
}else if(file.getFileType().equalsIgnoreCase("zip")) { }else if(file.getFileType().equalsIgnoreCase("zip")) {
//scorm包的内容 //scorm包的内容
try { try {
SCORMParser scormParser=new SCORMParser(); SCORMParser scormParser=new SCORMParser();
String json = scormParser.parserToJson(fileFullPath); String json = scormParser.parserToJson(fileFullPath);
file.setDuration(file.getDuration()*60);
file.setContent(json); file.setContent(json);
}catch (Exception e) { }catch (Exception e) {
log.error("上传的非scorm课件的zip文件", e); log.error("上传的非scorm课件的zip文件", e);