|
@@ -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;
|
|
@@ -50,19 +53,6 @@ public class FsUserCourseVideoController {
|
|
|
@Autowired
|
|
|
private IQwExternalContactService qwExternalContactService;
|
|
|
|
|
|
- @GetMapping("/pageList")
|
|
|
- @ApiOperation("课程分页列表")
|
|
|
- public ResponseResult<PageInfo<FsUserCourseVideoPageListVO>> list(UserCourseVideoPageParam param) {
|
|
|
- QwUser qwUser = qwUserService.getByQwUserIdAndCorId(param.getQwUserId(), param.getCorpId());
|
|
|
- if (qwUser==null||qwUser.getCompanyId()==null){
|
|
|
- return ResponseResult.fail(500,"无权限");
|
|
|
- }
|
|
|
- PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
- param.setCompanyId(qwUser.getCompanyId());
|
|
|
- List<FsUserCourseVideoPageListVO> list = fsUserCourseVideoService.pageListCourseVideo(param);
|
|
|
- PageInfo<FsUserCourseVideoPageListVO> pageInfo = new PageInfo<>(list);
|
|
|
- return ResponseResult.ok(pageInfo);
|
|
|
- }
|
|
|
|
|
|
@ApiOperation("课程视频详情")
|
|
|
@GetMapping(value = "/videoDetails")
|
|
@@ -70,34 +60,6 @@ public class FsUserCourseVideoController {
|
|
|
return fsUserCourseVideoService.getVideoDetails(videoId);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/courseList")
|
|
|
- @ApiOperation("获取课程下拉列表")
|
|
|
- public ResponseResult<PageInfo<FsUserCourseListVO>> getAllCourseList(FsUserCourseListParam param) {
|
|
|
- QwUser qwUser = qwUserService.getByQwUserIdAndCorId(param.getQwUserId(), param.getCorpId());
|
|
|
- if (qwUser==null||qwUser.getCompanyId()==null){
|
|
|
- return ResponseResult.fail(500,"无权限");
|
|
|
- }
|
|
|
- PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
- param.setCompanyId(qwUser.getCompanyId());
|
|
|
- List<FsUserCourseListVO> fsUserCourseList = fsUserCourseService.getFsUserCourseList(param);
|
|
|
- PageInfo<FsUserCourseListVO> pageInfo = new PageInfo<>(fsUserCourseList);
|
|
|
- return ResponseResult.ok(pageInfo);
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/videoList")
|
|
|
- @ApiOperation("获取视频下拉列表")
|
|
|
- public ResponseResult<PageInfo<FsUserVideoListVO>> getAllVideoList(UserCourseVideoPageParam param) {
|
|
|
- QwUser qwUser = qwUserService.getByQwUserIdAndCorId(param.getQwUserId(), param.getCorpId());
|
|
|
- if (qwUser==null||qwUser.getCompanyId()==null){
|
|
|
- return ResponseResult.fail(500,"无权限");
|
|
|
- }
|
|
|
- PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
- param.setCompanyId(qwUser.getCompanyId());
|
|
|
- List<FsUserVideoListVO> listCourseVideo = fsUserCourseVideoService.getListCourseVideo(param);
|
|
|
- PageInfo<FsUserVideoListVO> result = new PageInfo<>(listCourseVideo);
|
|
|
- return ResponseResult.ok(result);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@PostMapping("/getFsCourseListBySidebar")
|
|
|
@ApiOperation("获取视频课程下拉列表 侧边栏")
|
|
@@ -133,6 +95,63 @@ public class FsUserCourseVideoController {
|
|
|
@Autowired
|
|
|
private IFsCourseLinkService courseLinkService;
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建 发客户小程序
|
|
|
+ */
|
|
|
+
|
|
|
+ @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不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ return fsUserCourseVideoService.createCartLink(param);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/createRoomLink")
|
|
|
@ApiOperation("创建发群链接")
|
|
|
public R createRoomLink(FsCourseLinkRoomParam param) {
|