mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 20:36:50 +08:00
Merge branch 'zcwy0704-llf' into dev0525
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user