|
@@ -2,9 +2,13 @@ package com.yonge.cooleshow.teacher.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupDetailService;
|
|
import com.yonge.cooleshow.biz.dal.support.PageUtil;
|
|
import com.yonge.cooleshow.biz.dal.support.PageUtil;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.valid.AddGroup;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.valid.UpdateGroup;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
|
|
import com.yonge.cooleshow.common.page.PageInfo;
|
|
import com.yonge.cooleshow.common.page.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -20,6 +24,8 @@ import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
|
|
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 视频课基本信息表 web 控制层
|
|
* 视频课基本信息表 web 控制层
|
|
* @author yzp
|
|
* @author yzp
|
|
@@ -72,7 +78,7 @@ public class VideoLessonGroupController extends BaseController {
|
|
* @Date: 2022/3/31
|
|
* @Date: 2022/3/31
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "修改视频课组", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
@ApiOperation(value = "修改视频课组", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
- @PostMapping(value = "/update", consumes = "application/json", produces = "application/json")
|
|
|
|
|
|
+ @PostMapping(value = "/updateGroup", consumes = "application/json", produces = "application/json")
|
|
public HttpResponseResult<Object> update(@Validated @RequestBody VideoLessonGroupUpVo lessonGroupUpVo) {
|
|
public HttpResponseResult<Object> update(@Validated @RequestBody VideoLessonGroupUpVo lessonGroupUpVo) {
|
|
videoLessonGroupService.updateGroup(lessonGroupUpVo);
|
|
videoLessonGroupService.updateGroup(lessonGroupUpVo);
|
|
return succeed();
|
|
return succeed();
|
|
@@ -97,7 +103,7 @@ public class VideoLessonGroupController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "新增视频课组&视频课", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
@ApiOperation(value = "新增视频课组&视频课", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
@PostMapping(value = "/add", consumes = "application/json", produces = "application/json")
|
|
@PostMapping(value = "/add", consumes = "application/json", produces = "application/json")
|
|
- public HttpResponseResult<Object> add(@Validated @RequestBody VideoLessonVo lessonVo) {
|
|
|
|
|
|
+ public HttpResponseResult<Object> add(@Validated(AddGroup.class) @RequestBody VideoLessonVo lessonVo) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
|
|
if (sysUser == null||sysUser.getId()==null) {
|
|
if (sysUser == null||sysUser.getId()==null) {
|
|
@@ -109,4 +115,35 @@ public class VideoLessonGroupController extends BaseController {
|
|
videoLessonGroupService.add(lessonVo,sysUser);
|
|
videoLessonGroupService.add(lessonVo,sysUser);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @Description: 根据组id查询视频课&视频课组
|
|
|
|
+ * @Author: cy
|
|
|
|
+ * @Date: 2022/4/2
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "根据组id查询视频课&视频课组")
|
|
|
|
+ @GetMapping(value="/selectVideoLesson")
|
|
|
|
+ public HttpResponseResult<VideoLessonStudentVo> selectVideoLesson(@NotNull(message = "视频组id不能为空") Long groupId) {
|
|
|
|
+ return succeed(videoLessonGroupService.selectVideoLesson(groupId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @Description: 修改视频课组&视频课
|
|
|
|
+ * @Author: cy
|
|
|
|
+ * @Date: 2022/4/7
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "修改视频课组&视频课", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
|
|
+ @PostMapping(value = "/update", consumes = "application/json", produces = "application/json")
|
|
|
|
+ public HttpResponseResult<Object> update(@Validated(UpdateGroup.class) @RequestBody VideoLessonVo lessonVo) {
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+
|
|
|
|
+ if (sysUser == null||sysUser.getId()==null) {
|
|
|
|
+ return failed("用户信息获取失败");
|
|
|
|
+ }
|
|
|
|
+ if (lessonVo.getLessonList().isEmpty()) {
|
|
|
|
+ return failed("课程不能为空");
|
|
|
|
+ }
|
|
|
|
+ videoLessonGroupService.update(lessonVo,sysUser);
|
|
|
|
+ return succeed();
|
|
|
|
+ }
|
|
}
|
|
}
|