|
|
@@ -82,6 +82,20 @@ public class FeiShuService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 直接返回看课H5(供微信内打开,不包飞书文档)
|
|
|
+ */
|
|
|
+ public String getFeishuCourseH5Link(Long companyUserId, Long videoId, Long periodId) {
|
|
|
+ if (companyUserId == null || videoId == null) {
|
|
|
+ throw new CustomException("用户ID和视频ID不能为空");
|
|
|
+ }
|
|
|
+ FsUserCourseVideo userCourseVideo = videoMapper.selectFsUserCourseVideoByVideoId(videoId);
|
|
|
+ if (userCourseVideo == null) {
|
|
|
+ throw new CustomException("视频不存在: " + videoId);
|
|
|
+ }
|
|
|
+ return buildCourseLink(companyUserId, videoId, periodId);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 复制飞书看课新链接
|
|
|
*/
|
|
|
@@ -148,6 +162,26 @@ public class FeiShuService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 直接返回授权H5(供微信内打开,不包飞书文档)
|
|
|
+ */
|
|
|
+ public String getFeishuRegisterH5Link(FeishuLinkParam param) {
|
|
|
+ if (param == null || param.getCompanyUserId() == null || param.getCompanyId() == null) {
|
|
|
+ throw new CustomException("参数不能为空");
|
|
|
+ }
|
|
|
+ FsUserCourseVideo userCourseVideo = videoMapper.selectFsUserCourseVideoByVideoId(param.getVideoId());
|
|
|
+ if (userCourseVideo == null) {
|
|
|
+ throw new CustomException("视频不存在: " + param.getVideoId());
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ String authUrl = buildAuthLink(param.getCompanyId(), param.getCompanyUserId(),
|
|
|
+ param.getCourseId(), param.getVideoId(), param.getPeriodId(), param.getProjectId(), param.getId());
|
|
|
+ return java.net.URLDecoder.decode(authUrl, "UTF-8");
|
|
|
+ } catch (UnsupportedEncodingException e) {
|
|
|
+ throw new CustomException("授权URL解析失败", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 创建云文档
|