|
@@ -1,10 +1,12 @@
|
|
|
package com.fs.app.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.fs.common.annotation.RepeatSubmit;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
|
import com.fs.course.domain.FsUserCourse;
|
|
|
import com.fs.course.param.FsCourseLinkCreateParam;
|
|
|
+import com.fs.course.param.FsCourseLinkMiniParam;
|
|
|
import com.fs.course.param.FsCourseLinkRoomParam;
|
|
|
import com.fs.course.param.FsCourseListBySidebarParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseListParam;
|
|
@@ -21,6 +23,7 @@ import com.fs.course.vo.newfs.FsUserVideoListVO;
|
|
|
import com.fs.qw.domain.QwUser;
|
|
|
import com.fs.qw.service.IQwExternalContactService;
|
|
|
import com.fs.qw.service.IQwUserService;
|
|
|
+import com.fs.voice.utils.StringUtil;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -130,6 +133,63 @@ public class FsUserCourseVideoController {
|
|
|
return R.ok().put("data", result);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @RepeatSubmit
|
|
|
+ @PostMapping("/createMiniLink")
|
|
|
+ public R createMiniLink(@RequestBody FsCourseLinkMiniParam param) {
|
|
|
+
|
|
|
+ if (param.getCourseId()==null){
|
|
|
+ return R.error("课程id不能为空");
|
|
|
+ }
|
|
|
+ if (param.getVideoId()==null){
|
|
|
+ return R.error("视频id不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtil.strIsNullOrEmpty(param.getQwUserId())){
|
|
|
+ return R.error("用户id不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtil.strIsNullOrEmpty(param.getCorpId())){
|
|
|
+ return R.error("企业id不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (param.getExternalUserId()==null){
|
|
|
+ return R.error("客户id不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ return fsUserCourseVideoService.createMiniLink(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建发卡片
|
|
|
+ */
|
|
|
+ @RepeatSubmit
|
|
|
+ @PostMapping("/createCartLink")
|
|
|
+ public R createCartLink(@RequestBody FsCourseLinkMiniParam param) {
|
|
|
+ if (param.getCourseId()==null){
|
|
|
+ return R.error("课程id不能为空");
|
|
|
+ }
|
|
|
+ if (param.getVideoId()==null){
|
|
|
+ return R.error("视频id不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtil.strIsNullOrEmpty(param.getQwUserId())){
|
|
|
+ return R.error("用户id不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtil.strIsNullOrEmpty(param.getCorpId())){
|
|
|
+ return R.error("企业id不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (param.getExternalUserId()==null){
|
|
|
+ return R.error("客户id不能为空");
|
|
|
+ }
|
|
|
+ if (param.getType()==null || param.getType()==1){
|
|
|
+ return fsUserCourseVideoService.createCartLink(param);
|
|
|
+ }else {
|
|
|
+ return fsUserCourseVideoService.createMiniLink(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Autowired
|
|
|
private IFsCourseLinkService courseLinkService;
|
|
|
|