|
@@ -383,7 +383,13 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
|
|
watchLog.setDuration(duration);
|
|
watchLog.setDuration(duration);
|
|
|
|
|
|
//取对应视频的时长
|
|
//取对应视频的时长
|
|
- Long videoDuration = getFsUserVideoDuration(videoId);
|
|
|
|
|
|
+ Long videoDuration = 0L;
|
|
|
|
+ try {
|
|
|
|
+ videoDuration = getFsUserVideoDuration(videoId);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.error("视频时长识别错误:{}", key);
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
if (videoDuration != null && videoDuration != 0) {
|
|
if (videoDuration != null && videoDuration != 0) {
|
|
//判断是否完课
|
|
//判断是否完课
|
|
long percentage = (duration * 100 / videoDuration);
|
|
long percentage = (duration * 100 / videoDuration);
|