|
@@ -23,6 +23,8 @@ import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
|
|
import com.zhongzheng.modules.course.service.*;
|
|
import com.zhongzheng.modules.course.service.*;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionImport;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionImport;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
|
|
+import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
|
|
|
|
+import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
|
|
import com.zhongzheng.modules.system.domain.SysRoleMenu;
|
|
import com.zhongzheng.modules.system.domain.SysRoleMenu;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -73,6 +75,9 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
@Autowired
|
|
@Autowired
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IPolyvVideoService iPolyvVideoService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public CourseSectionVo queryById(Long sectionId){
|
|
public CourseSectionVo queryById(Long sectionId){
|
|
CourseSection db = this.baseMapper.selectById(sectionId);
|
|
CourseSection db = this.baseMapper.selectById(sectionId);
|
|
@@ -254,12 +259,15 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
bo.setImportBy(operName);
|
|
bo.setImportBy(operName);
|
|
bo.setImportNo(importNo);
|
|
bo.setImportNo(importNo);
|
|
bo.setSectionType(sectionType);
|
|
bo.setSectionType(sectionType);
|
|
- bo.setDurationTime(sectionImport.getDurationTime());
|
|
|
|
|
|
+ // bo.setDurationTime(sectionImport.getDurationTime());
|
|
bo.setRecordingUrl(sectionImport.getRecordingUrl());
|
|
bo.setRecordingUrl(sectionImport.getRecordingUrl());
|
|
bo.setLiveUrl(sectionImport.getLiveUrl());
|
|
bo.setLiveUrl(sectionImport.getLiveUrl());
|
|
bo.setPublishStatus(sectionImport.getPublishStatus().equals("发布")?1:0);
|
|
bo.setPublishStatus(sectionImport.getPublishStatus().equals("发布")?1:0);
|
|
bo.setStatus(1);
|
|
bo.setStatus(1);
|
|
bo.setCoverUrl("oss/images/avatar/20211013/1634097664410_1397766697");
|
|
bo.setCoverUrl("oss/images/avatar/20211013/1634097664410_1397766697");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if(Validator.isNotEmpty(sectionImport.getLiveStartTime())){
|
|
if(Validator.isNotEmpty(sectionImport.getLiveStartTime())){
|
|
if(sectionImport.getLiveStartTime().length()!=19){
|
|
if(sectionImport.getLiveStartTime().length()!=19){
|
|
errorLog+="第"+(size - Index)+"条:直播开始时间不对。\r\n";
|
|
errorLog+="第"+(size - Index)+"条:直播开始时间不对。\r\n";
|
|
@@ -284,6 +292,20 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(bo.getSectionType()==1){
|
|
|
|
+ try{
|
|
|
|
+ PolyvVideoQuerVo poly = iPolyvVideoService.queryById(bo.getRecordingUrl());
|
|
|
|
+ if(Validator.isNotEmpty(poly)){
|
|
|
|
+ bo.setDurationTime(new Long(DateUtils.durationFormat(poly.getDuration())));
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ errorLog+="第"+(size - Index)+"条:读取保利威时长错误。\r\n";
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(bo.getSectionType()==2){
|
|
|
|
+ bo.setDurationTime(bo.getLiveEndTime().longValue() - bo.getLiveStartTime().longValue());
|
|
|
|
+ }
|
|
errorLog = insertByAddBoImport(bo,errorLog,(size - Index));
|
|
errorLog = insertByAddBoImport(bo,errorLog,(size - Index));
|
|
i++;
|
|
i++;
|
|
|
|
|