|
@@ -134,6 +134,9 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
@Autowired
|
|
|
private FsVideoResourceMapper fsVideoResourceMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FsUserCourseMapper fsUserCourseMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询课堂视频
|
|
|
*
|
|
@@ -918,9 +921,18 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
log.setCompanyUserId(param.getCompanyUserId());
|
|
|
log.setVideoId(param.getVideoId());
|
|
|
List<FsCourseWatchLog> fsCourseWatchLogs = courseWatchLogMapper.selectFsCourseWatchLogList(log);
|
|
|
+
|
|
|
+ // 获取课程所属项目id
|
|
|
+ FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(param.getCourseId());
|
|
|
+ Long courseProject = null;
|
|
|
+ if(fsUserCourse != null){
|
|
|
+ courseProject = fsUserCourse.getProject();
|
|
|
+ }
|
|
|
//如果存在,则更新
|
|
|
if (fsCourseWatchLogs != null && !fsCourseWatchLogs.isEmpty()){
|
|
|
FsCourseWatchLog updateLog = new FsCourseWatchLog();
|
|
|
+ updateLog.setPeriodId(param.getPeriodId());
|
|
|
+ updateLog.setProject(courseProject);
|
|
|
updateLog.setUpdateTime(new Date());
|
|
|
courseWatchLogMapper.updateFsCourseWatchLog(updateLog);
|
|
|
} else {
|
|
@@ -931,6 +943,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
fsCourseWatchLog.setDuration(0L);
|
|
|
fsCourseWatchLog.setCreateTime(new Date());
|
|
|
fsCourseWatchLog.setLogType(1);
|
|
|
+ fsCourseWatchLog.setProject(courseProject);
|
|
|
courseWatchLogMapper.insertFsCourseWatchLog(fsCourseWatchLog);
|
|
|
}
|
|
|
} else {
|