在线课时长添加

This commit is contained in:
zhaolongfei
2024-07-04 15:36:43 +08:00
parent ebaf8e09d3
commit e7b6d08802

View File

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