|
@@ -1,5 +1,9 @@
|
|
|
package com.yonge.cooleshow.admin.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.search.VideoGroupSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
|
|
@@ -15,10 +19,12 @@ import com.yonge.cooleshow.common.page.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @Author: cy
|
|
@@ -30,18 +36,11 @@ import javax.validation.constraints.NotNull;
|
|
|
@Validated
|
|
|
public class VideoLessonController extends BaseController {
|
|
|
@Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+ @Autowired
|
|
|
private VideoLessonGroupService lessonGroupService;
|
|
|
@Autowired
|
|
|
private VideoLessonGroupDetailService videoLessonGroupDetailService;
|
|
|
- @Autowired
|
|
|
- private VideoLessonGroupService videoLessonGroupService;
|
|
|
-
|
|
|
- @ApiOperation(value = "修改视频课组审核状态", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
|
- @PostMapping(value = "/updateGroup", consumes = "application/json", produces = "application/json")
|
|
|
- public HttpResponseResult<Object> update(@Validated @RequestBody VideoLessonExamineVo examineVo) {
|
|
|
- videoLessonGroupService.updateGroup(examineVo);
|
|
|
- return succeed();
|
|
|
- }
|
|
|
|
|
|
@ApiOperation(value = "根据视频课组id查详情")
|
|
|
@GetMapping(value = "/selectGroupById")
|
|
@@ -92,4 +91,41 @@ public class VideoLessonController extends BaseController {
|
|
|
public HttpResponseResult<PageInfo<VideoLessonGroupDetail>> page(@Validated(SelectGroup.class) @RequestBody VideoLessonSearch search) {
|
|
|
return succeed(PageUtil.pageInfo(videoLessonGroupDetailService.selectPage(PageUtil.getPage(search), search)));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description: 审核-视频课组列表
|
|
|
+ * @Author: cy
|
|
|
+ * @Date: 2022/4/20
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "审核-视频课组列表", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
|
+ @PostMapping(value = "/queryGroupList", consumes = "application/json", produces = "application/json")
|
|
|
+ public HttpResponseResult<PageInfo<VideoLessonAuthGroup>> queryGroupList(@RequestBody VideoGroupSearch search) {
|
|
|
+ return succeed(PageUtil.pageInfo(lessonGroupService.queryGroupList(PageUtil.getPage(search), search)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description: 审核-根据视频课组id查视频课详情
|
|
|
+ * @Author: cy
|
|
|
+ * @Date: 2022/4/20
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "审核-根据视频课组id查视频课详情", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
|
+ @GetMapping("/queryLessonInfo")
|
|
|
+ public HttpResponseResult<List<VideoLessonGroupDetail>> queryLessonInfo(Integer groupId) {
|
|
|
+ QueryWrapper<VideoLessonGroupDetail> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("video_lesson_group_id_", groupId);
|
|
|
+ return succeed(videoLessonGroupDetailService.list(queryWrapper));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "审核-修改视频课组审核状态", httpMethod = "POST", consumes = "application/json", produces = "application/json")
|
|
|
+ @PostMapping(value = "/updateGroup", consumes = "application/json", produces = "application/json")
|
|
|
+ public HttpResponseResult<Object> update(@Validated @RequestBody VideoLessonExamineVo examineVo) {
|
|
|
+ SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
+ if (user == null || null == user.getId()) {
|
|
|
+ return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
+ }
|
|
|
+ examineVo.setAuditId(user.getId());
|
|
|
+ examineVo.setAuditName(user.getUsername());
|
|
|
+ lessonGroupService.updateGroup(examineVo);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
}
|