|
@@ -1,5 +1,6 @@
|
|
|
package com.fs.course.service.impl;
|
|
package com.fs.course.service.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
@@ -41,10 +42,7 @@ import com.fs.course.param.newfs.FsUserCourseAddCompanyUserParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoLinkParam;
|
|
import com.fs.course.param.newfs.FsUserCourseVideoLinkParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoUParam;
|
|
import com.fs.course.param.newfs.FsUserCourseVideoUParam;
|
|
|
import com.fs.course.param.newfs.UserCourseVideoPageParam;
|
|
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.*;
|
|
|
import com.fs.course.vo.newfs.*;
|
|
import com.fs.course.vo.newfs.*;
|
|
|
import com.fs.enums.ExceptionCodeEnum;
|
|
import com.fs.enums.ExceptionCodeEnum;
|
|
@@ -252,6 +250,9 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsCourseLinkService linkService;
|
|
private IFsCourseLinkService linkService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询课堂视频
|
|
* 查询课堂视频
|
|
@@ -1590,6 +1591,15 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
return R.error("未识别到用户信息");
|
|
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());
|
|
FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByFsUser(param.getUserId(), param.getVideoId(), param.getCompanyUserId());
|
|
|
if (log == null) {
|
|
if (log == null) {
|
|
|
return R.error("无记录");
|
|
return R.error("无记录");
|
|
@@ -1993,7 +2003,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
// if (company.getCourseMiniAppId()==null){
|
|
// if (company.getCourseMiniAppId()==null){
|
|
|
// return R.error("销售公司参数错误,未绑定小程序");
|
|
// return R.error("销售公司参数错误,未绑定小程序");
|
|
|
// }
|
|
// }
|
|
|
- if (user.getMpOpenId() != null && !isNewWxMerchant) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(user.getMpOpenId()) && !isNewWxMerchant) {
|
|
|
packetParam.setOpenId(user.getMpOpenId());
|
|
packetParam.setOpenId(user.getMpOpenId());
|
|
|
} else {
|
|
} else {
|
|
|
//查询是否绑定小程序
|
|
//查询是否绑定小程序
|