|
|
@@ -40,6 +40,7 @@ import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
import com.fs.course.service.IFsVideoResourceService;
|
|
|
import com.fs.course.vo.*;
|
|
|
import com.fs.course.vo.newfs.*;
|
|
|
+import com.fs.feishu.model.FeishuLinkParam;
|
|
|
import com.fs.feishu.service.FeiShuService;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.domain.FsUserIntegralLogs;
|
|
|
@@ -2394,7 +2395,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
Long companyId = qwUser.getCompanyId();
|
|
|
Long companyUserId = qwUser.getCompanyUserId();
|
|
|
|
|
|
- addWatchLogIfNeeded(param.getVideoId(), param.getCourseId(),param.getFsUserId(),qwUser , param.getExternalUserId());
|
|
|
+ Long logId=addWatchLogIfNeeded(param.getVideoId(), param.getCourseId(),param.getFsUserId(),qwUser , param.getExternalUserId());
|
|
|
|
|
|
//2.创建课程短链
|
|
|
Map<String, String> feishuH5Link = createFeishuH5Link(param.getCorpId(), createTime, courseId.intValue(), videoId.intValue(), String.valueOf(qwUserId), companyUserId, companyId, externalUserId, config);
|
|
|
@@ -2402,7 +2403,14 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
String shortCode = feishuH5Link.get("link");
|
|
|
|
|
|
//3.调用生成飞书注册授权链接(不走ipad)
|
|
|
- String feishuLink = feiShuService.getFeishuRegisterLink(videoId, companyId, courseId, companyUserId,shortCode);
|
|
|
+ FeishuLinkParam feishuLinkParam=new FeishuLinkParam();
|
|
|
+ feishuLinkParam.setCompanyId(companyId);
|
|
|
+ feishuLinkParam.setCompanyUserId(companyUserId);
|
|
|
+ feishuLinkParam.setCourseId(courseId);
|
|
|
+ feishuLinkParam.setVideoId(videoId);
|
|
|
+ feishuLinkParam.setLink(shortCode);
|
|
|
+ feishuLinkParam.setLogId(logId);
|
|
|
+ String feishuLink = feiShuService.getFeishuCoursePageLink(feishuLinkParam);
|
|
|
|
|
|
|
|
|
//生成卡片链接
|
|
|
@@ -2464,9 +2472,9 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
|
|
|
//插入观看记录
|
|
|
- private void addWatchLogIfNeeded(Long videoId, Long courseId,
|
|
|
+ private Long addWatchLogIfNeeded(Long videoId, Long courseId,
|
|
|
Long fsUserId, QwUser qwUser,Long externalId) {
|
|
|
-
|
|
|
+ Long logId=null;
|
|
|
try {
|
|
|
|
|
|
FsCourseWatchLog watchLog = new FsCourseWatchLog();
|
|
|
@@ -2489,13 +2497,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
watchLog.setUserId(fsUserId);
|
|
|
|
|
|
//存看课记录
|
|
|
- courseWatchLogMapper.insertOrUpdateFsCourseWatchLog(watchLog);
|
|
|
-
|
|
|
+ courseWatchLogMapper.insertOrUpdateFsCourseWatchLog(watchLog);
|
|
|
+ logId = watchLog.getLogId();
|
|
|
}catch (Exception e){
|
|
|
logger.error("一键群发失败-插入观看记录失败:"+e.getMessage());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ return logId;
|
|
|
}
|
|
|
|
|
|
private void createNotionH5Link(String corpId, Date sendTime,
|