瀏覽代碼

更新描述

cy 3 年之前
父節點
當前提交
f8d2933a5c

+ 56 - 8
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/CourseGroupController.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.admin.controller;
 
 import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupDetailSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupSearch;
+import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
 import com.yonge.cooleshow.biz.dal.support.PageUtil;
@@ -11,10 +12,13 @@ import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.toolset.base.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.validation.constraints.NotNull;
+
 /**
  * @Author: cy
  * @Date: 2022/5/19
@@ -27,51 +31,95 @@ public class CourseGroupController extends BaseController {
     @Autowired
     private CourseGroupService courseGroupService;
 
-    @ApiOperation(value = "课程组管理-陪练课")
+    @ApiOperation(value = "课程组管理-陪练课",notes = "{\n" +
+            "    \"subjectId\":20,\n" +
+            "    \"search\":\"师\",\n" +
+            "    \"status\":\"ING\"\n" +
+            "}")
     @PostMapping(value = "/practice")
     public HttpResponseResult<PageInfo<CourseGroupPracticeVo>> selectPracticeGroup(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectPracticeGroup(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-陪练课-详情")
+    @ApiOperation(value = "课程组管理-陪练课-详情",notes = "{\n" +
+            "    \"courseGroupId\": 140,\n" +
+            "    \"teacherSign\": 0,\n" +
+            "    \"studentSign\": 0,\n" +
+            "    \"search\": \"游\",\n" +
+            "    \"status\": \"COMPLETE\",\n" +
+            "    \"salaryStatus\": \"NOT_START\",\n" +
+            "    \"startTime\": \"2022-05-21 08:00:00\",\n" +
+            "    \"endTime\": \"\"\n" +
+            "}")
     @PostMapping(value = "/practice/detail")
     public HttpResponseResult<PageInfo<CourseGroupPracticeDetailVo>> selectPracticeGroupDetail(@Validated @RequestBody CourseGroupDetailSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectPracticeGroupDetail(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-直播课")
+    @ApiOperation(value = "课程组管理-直播课",notes = "{\n" +
+            "    \"subjectId\":73,\n" +
+            "    \"search\":\"夏\",\n" +
+            "    \"status\":\"ING\"\n" +
+            "}")
     @PostMapping(value = "/live")
     public HttpResponseResult<PageInfo<CourseGroupLiveVo>> selectLiveGroup(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectLiveGroup(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-直播课-购买学员")
+    @ApiOperation(value = "课程组管理-直播课-购买学员",notes = "{\n" +
+            "    \"groupId\":140,\n" +
+            "    \"search\":\"游\",\n" +
+            "    \"orderNo\":\"22051615250800001\"\n" +
+            "}")
     @PostMapping(value = "/live/studentPayment")
     public HttpResponseResult<PageInfo<CourseSchedulePaymentVo>> selectLiveGroupStudent(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectLiveGroupStudent(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-直播课-教学计划")
+    @ApiOperation(value = "课程组管理-直播课-教学计划",notes = "{\n" +
+            "    \"groupId\":140,\n" +
+            "    \"courseId\":\"391\",\n" +
+            "    \"salaryStatus\":\"NOT_START\",\n" +
+            "    \"startTime\":\"2022-05-20 08:00:00\",\n" +
+            "    \"endTime\":null\n" +
+            "}")
     @PostMapping(value = "/live/plan")
     public HttpResponseResult<PageInfo<CourseSchedulePlanVo>> selectLiveGroupPlan(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectLiveGroupPlan(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-视频课")
+    @ApiOperation(value = "课程组管理-视频课",notes = "{\n" +
+            "    \"subjectId\":21,\n" +
+            "    \"search\":\"老\"\n" +
+            "}")
     @PostMapping(value = "/video")
     public HttpResponseResult<PageInfo<CourseGroupVideoVo>> selectVideoGroup(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectVideoGroup(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-视频课-购买学员")
+    @ApiOperation(value = "课程组管理-视频课-购买学员",notes = "{\n" +
+            "    \"groupId\":51,\n" +
+            "    \"orderNo\":\"22050720002900001\",\n" +
+            "    \"search\":\"1\",\n" +
+            "    \"startTime\":\"2022-05-07 20:00:29\",\n" +
+            "    \"endTime\":null\n" +
+            "}")
     @PostMapping(value = "/video/studentPayment")
     public HttpResponseResult<PageInfo<CourseGroupStudentVo>> selectVideoGroupStudent(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectVideoGroupStudent(PageUtil.getPage(search), search)));
     }
 
-    @ApiOperation(value = "课程组管理-视频课-教学计划")
+    @ApiOperation(value = "课程组管理-视频课-教学计划",notes = "{\n" +
+            "    \"groupId\":18\n" +
+            "}")
     @PostMapping(value = "/video/plan")
     public HttpResponseResult<PageInfo<VideoLessonGroupDetail>> selectVideoGroupPlan(@RequestBody CourseGroupSearch search) {
         return succeed(PageUtil.pageInfo(courseGroupService.selectVideoGroupPlan(PageUtil.getPage(search), search)));
     }
+
+    @ApiOperation(value = "课程组管理-直播课-课程信息")
+    @GetMapping(value = "/live/info")
+    public HttpResponseResult<CourseGroup> selectLiveGroupInfo(@NotNull Long groupId) {
+        return succeed(courseGroupService.selectLiveGroupInfo(groupId));
+    }
 }

+ 8 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java

@@ -10,6 +10,7 @@ import com.yonge.cooleshow.biz.dal.dto.req.OrderReq;
 import com.yonge.cooleshow.biz.dal.dto.search.*;
 import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
+import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.biz.dal.vo.res.OrderCreateRes;
@@ -235,5 +236,12 @@ public interface CourseGroupService extends IService<CourseGroup> {
      * @return
      */
     IPage<VideoLessonGroupDetail> selectVideoGroupPlan(IPage<VideoLessonGroupDetail> page, CourseGroupSearch search);
+
+    /**
+     * 课程组管理-直播课-课程信息
+     * @param groupId
+     * @return
+     */
+    CourseGroup selectLiveGroupInfo(Long groupId);
 }
 

+ 5 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java

@@ -945,6 +945,11 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         return baseMapper.selectVideoGroupPlan(page,search);
     }
 
+    @Override
+    public CourseGroup selectLiveGroupInfo(Long groupId) {
+        return baseMapper.selectById(groupId);
+    }
+
     /**
      * 定时将符合开售日期的未开售的直播课课程组修改为报名中状态
      */

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -1370,7 +1370,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         List<String> futureDaysNoVacation = futureDays.stream().filter(item -> !holiday.contains(item)).collect(Collectors.toList());
 
         //查询所有老师未开始、进行中的课程
-        List<String> statusList = Lists.newArrayList(CourseScheduleEnum.NOT_START.getCode(), CourseScheduleEnum.ING.getCode());
+//        List<String> statusList = Lists.newArrayList(CourseScheduleEnum.NOT_START.getCode(), CourseScheduleEnum.ING.getCode());
 
         List<Long> teacherIdList = new ArrayList<>();
         getAllTimeConfig(skipHoliday, futureDaysNoVacation, teacherIdList);//跳过节假日配置