|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fs.course.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
@@ -42,10 +43,7 @@ import com.fs.course.param.newfs.FsUserCourseAddCompanyUserParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoLinkParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoUParam;
|
|
|
import com.fs.course.param.newfs.UserCourseVideoPageParam;
|
|
|
-import com.fs.course.service.IFsCourseLinkService;
|
|
|
-import com.fs.course.service.IFsUserCompanyBindService;
|
|
|
-import com.fs.course.service.IFsUserCompanyUserService;
|
|
|
-import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
+import com.fs.course.service.*;
|
|
|
import com.fs.course.vo.*;
|
|
|
import com.fs.course.vo.newfs.*;
|
|
|
import com.fs.his.config.AppConfig;
|
|
|
@@ -257,6 +255,9 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
@Autowired
|
|
|
private IFsCourseLinkService linkService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询课堂视频
|
|
|
@@ -1592,6 +1593,15 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
return R.error("未识别到用户信息");
|
|
|
}
|
|
|
|
|
|
+ FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigService.selectCoursePlaySourceConfigByAppId(param.getAppId());
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(fsCoursePlaySourceConfig)) {
|
|
|
+ param.setSource(fsCoursePlaySourceConfig.getAuthType().equals(1)?2:1);
|
|
|
+ }
|
|
|
+ if (param.getSource()==1&&StringUtils.isEmpty(user.getMpOpenId())){
|
|
|
+ return R.error(401,"请重新授权!");
|
|
|
+ }
|
|
|
+
|
|
|
FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByFsUser(param.getUserId(), param.getVideoId(), param.getCompanyUserId());
|
|
|
if (log == null) {
|
|
|
return R.error("无记录");
|