|
|
@@ -700,6 +700,34 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
st.setMiniprogramTitle("领取开箱密码");
|
|
|
st.setMiniprogramPage(linkByMiniApp);
|
|
|
break;
|
|
|
+ //飞书看课
|
|
|
+ case "18":
|
|
|
+ // 参数转换
|
|
|
+ Integer videoId = param.getVideoId() != null ? param.getVideoId().intValue() : null;
|
|
|
+ Integer courseId = param.getCourseId() != null ? param.getCourseId().intValue() : null;
|
|
|
+ Long companyIdLong = qwUser.getCompanyId();
|
|
|
+ Long externalUserId = vo.getId();
|
|
|
+ Long companyUserIdLong = Long.parseLong(companyUserId);
|
|
|
+ if (videoId == null) {
|
|
|
+ log.error("飞书链接生成失败:视频ID为空,sopId={}", param.getSopId());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ //2.创建课程短链
|
|
|
+ Map<String, String> feishuH5Link = createFeishuH5Link(st, param.getCorpId(), createTime, courseId, videoId, String.valueOf(qwUser.getId()), companyUserId, String.valueOf(companyIdLong), externalUserId, config);
|
|
|
+ //获取生成的课程短链码
|
|
|
+ String shortCode = feishuH5Link.get("link");
|
|
|
+
|
|
|
+ //3.调用生成飞书注册授权链接
|
|
|
+ String feishuLink = feiShuService.getFeishuRegisterLink(videoId.longValue(), companyIdLong, courseId.longValue(), companyUserIdLong,shortCode);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(feishuLink)) {
|
|
|
+
|
|
|
+ st.setLinkUrl(feishuLink);
|
|
|
+ } else {
|
|
|
+ log.error("生成飞书注册链接失败,sopId={}", param.getSopId());
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
setting.setSetting(list);
|
|
|
@@ -841,6 +869,33 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
st.setMiniprogramTitle("领取开箱密码");
|
|
|
st.setMiniprogramPage(linkByMiniApp);
|
|
|
break;
|
|
|
+ //飞书看课
|
|
|
+ case "18":
|
|
|
+ // 参数转换
|
|
|
+ Integer videoId = param.getVideoId() != null ? param.getVideoId().intValue() : null;
|
|
|
+ Integer courseId = param.getCourseId() != null ? param.getCourseId().intValue() : null;
|
|
|
+ Long companyIdLong = Long.valueOf(qwUser.getCompanyId().toString());
|
|
|
+ Long externalUserId = Long.valueOf(groupChat.getChatId());
|
|
|
+ Long companyUserIdLong = Long.valueOf(qwUser.getCompanyUserId().toString());
|
|
|
+ if (videoId == null) {
|
|
|
+ log.error("飞书链接生成失败:视频ID为空,sopId={}", param.getSopId());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ //2.创建课程短链
|
|
|
+ Map<String, String> feishuH5Link = createFeishuH5Link(st, param.getCorpId(), createTime, courseId, videoId, String.valueOf(qwUser.getId()), String.valueOf(companyUserIdLong), String.valueOf(companyIdLong), externalUserId, config);
|
|
|
+ //获取生成的课程短链码
|
|
|
+ String shortCode = feishuH5Link.get("link");
|
|
|
+
|
|
|
+ //3.调用生成飞书注册授权链接
|
|
|
+ String feishuLink = feiShuService.getFeishuRegisterLink(videoId.longValue(), companyIdLong, courseId.longValue(), companyUserIdLong,shortCode);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(feishuLink)) {
|
|
|
+
|
|
|
+ st.setLinkUrl(feishuLink);
|
|
|
+ } else {
|
|
|
+ log.error("生成飞书注册链接失败,sopId={}", param.getSopId());
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
setting.setSetting(list);
|