Explorar o código

飞书代码3

cgp hai 1 día
pai
achega
77fe093b63

+ 1 - 2
fs-company/src/main/java/com/fs/company/controller/course/FeiShuCourseController.java

@@ -28,7 +28,6 @@ public class FeiShuCourseController extends BaseController {
     public AjaxResult getFeiShuCourseLink(
             @RequestParam(value = "videoId", required = true) Long videoId,
             @RequestParam(value = "courseId", required = false) Long courseId,
-            @RequestParam(value = "projectId", required = false) Long projectId,
             @RequestParam(value = "id", required = false) Long id) {
 
         // 1. 强制必填参数校验
@@ -51,7 +50,7 @@ public class FeiShuCourseController extends BaseController {
 
         // 4. 调用业务层生成链接
         try {
-            String feishuLink = feiShuService.generateRegisterLink(videoId, companyId, courseId, companyUserId, projectId, id);
+            String feishuLink = feiShuService.generateRegisterLink(videoId, companyId, courseId, companyUserId, id);
             return AjaxResult.success(feishuLink);
         } catch (CustomException e) {
             log.error("生成飞书看课链接业务异常:{}", e.getMessage());

+ 5 - 8
fs-service/src/main/java/com/fs/feishu/service/FeiShuService.java

@@ -98,7 +98,7 @@ public class FeiShuService {
             String documentId = createDocument(userCourseVideo.getTitle());
 
             // 拼接新看课url
-            String url = buildCourseNewLink(param.getCompanyId(), param.getCompanyUserId(), param.getCourseId(), param.getVideoId(), param.getProjectId(),param.getUserId(),param.getId());
+            String url = buildCourseNewLink(param.getCompanyId(), param.getCompanyUserId(), param.getCourseId(), param.getVideoId(),param.getUserId(),param.getId());
 
             // 创建iframe块
             createIframeBlock(documentId, url);
@@ -113,7 +113,7 @@ public class FeiShuService {
         }
     }
 
-    public String generateRegisterLink(Long videoId, Long companyId, Long courseId,Long companyUserId, Long projectId, Long id) {
+    public String generateRegisterLink(Long videoId, Long companyId, Long courseId,Long companyUserId, Long id) {
         // 读取配置判断是否启用飞书新跳转
         String json = configService.selectConfigByKey("course.config");
         if (StringUtils.isBlank(json)) {
@@ -131,7 +131,6 @@ public class FeiShuService {
         param.setCompanyUserId(companyUserId);
         param.setCourseId(courseId);
         param.setVideoId(videoId);
-        param.setProjectId(projectId);
         param.setId(id);
         // 调用原有方法
         return getFeishuRegisterLink(param);
@@ -151,7 +150,7 @@ public class FeiShuService {
 
             // 拼接授权url
             String authUrl = buildAuthLink(param.getCompanyId(), param.getCompanyUserId(),
-                    param.getCourseId(), param.getVideoId(), param.getProjectId(),param.getId());
+                    param.getCourseId(), param.getVideoId(),param.getId());
 
             // 创建关注公众号 text + link block
             createTextLinkBlock(documentId, authUrl);
@@ -196,7 +195,7 @@ public class FeiShuService {
     /**
      * 拼接看课url(课程参数JSON方式,适配飞书iframe,双重URL编码)
      */
-    private String buildCourseNewLink(Long companyId, Long companyUserId, Long courseId, Long videoId, Long projectId,Long userId,Long id) {
+    private String buildCourseNewLink(Long companyId, Long companyUserId, Long courseId, Long videoId,Long userId,Long id) {
         String json = configService.selectConfigByKey("course.config");
         CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
 
@@ -204,7 +203,6 @@ public class FeiShuService {
         Map<String, Object> courseParam = new LinkedHashMap<>();
         courseParam.put("companyUserId", companyUserId);
         courseParam.put("videoId", videoId);
-        courseParam.put("projectId", projectId);
         courseParam.put("companyId", companyId);
         courseParam.put("courseId", courseId);
         courseParam.put("id", id);
@@ -225,14 +223,13 @@ public class FeiShuService {
     /**
      * 拼接授权url(课程参数JSON方式,适配飞书iframe,双重URL编码)
      */
-    private String buildAuthLink(Long companyId, Long companyUserId, Long courseId, Long videoId, Long projectId,Long id) {
+    private String buildAuthLink(Long companyId, Long companyUserId, Long courseId, Long videoId,Long id) {
         String json = configService.selectConfigByKey("course.config");
         CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
 
         Map<String, Object> authParam = new LinkedHashMap<>();
         authParam.put("companyUserId", companyUserId);
         authParam.put("videoId", videoId);
-        authParam.put("projectId", projectId);
         authParam.put("companyId", companyId);
         authParam.put("courseId", courseId);
         authParam.put("id", id);