|  | @@ -1,8 +1,6 @@
 | 
	
		
			
				|  |  |  package com.yonge.cooleshow.admin.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.metadata.IPage;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.LiveSaleOutDto;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.LiveCourseGroupSearch;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.LiveCourseGroupStudentCourseSearch;
 | 
	
	
		
			
				|  | @@ -20,14 +18,10 @@ import com.yonge.toolset.mybatis.support.PageUtil;
 | 
	
		
			
				|  |  |  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.PathVariable;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestBody;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import javax.validation.Valid;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -41,23 +35,14 @@ import java.util.List;
 | 
	
		
			
				|  |  |  @RestController
 | 
	
		
			
				|  |  |  @RequestMapping("${app-config.url.admin:}/courseGroup")
 | 
	
		
			
				|  |  |  public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  | -    /**
 | 
	
		
			
				|  |  | -     * 服务对象
 | 
	
		
			
				|  |  | -     */
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  |      private CourseGroupService courseGroupService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "老师直播课列表", httpMethod="POST", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/list", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<LiveCourseGroupVo>> teacherList(@Validated(value = LiveCourseGroupSearch.TeacherGroup.class)
 | 
	
		
			
				|  |  |                                                                             @RequestBody LiveCourseGroupSearch query) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          query.setCourseType(CourseScheduleEnum.LIVE);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          IPage<LiveCourseGroupVo> liveCourseGroupVoIPage = courseGroupService
 | 
	
	
		
			
				|  | @@ -70,10 +55,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/list/student", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<LiveCourseGroupVo>> studentList(@Validated(value = LiveCourseGroupSearch.StudentGroup.class)
 | 
	
		
			
				|  |  |                                                                             @RequestBody LiveCourseGroupSearch query) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          query.setCourseType(CourseScheduleEnum.LIVE);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          IPage<LiveCourseGroupVo> liveCourseGroupVoIPage = courseGroupService
 | 
	
	
		
			
				|  | @@ -85,10 +66,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping(value="/detail/{courseGroupId}")
 | 
	
		
			
				|  |  |      public HttpResponseResult<LiveCourseGroupVo> detail(@ApiParam(value = "课程组编号ID", required = true)
 | 
	
		
			
				|  |  |                                                                     @PathVariable("courseGroupId") Long courseGroupId) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          if (courseGroupId == null) {
 | 
	
		
			
				|  |  |              return failed("课程组id不能为空");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -104,10 +81,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "直播课下架")
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/saleOut")
 | 
	
		
			
				|  |  |      public HttpResponseResult<Boolean> liveSaleOut(@RequestBody @Valid LiveSaleOutDto dto) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          if (dto.getCourseGroupId() == null) {
 | 
	
		
			
				|  |  |              return failed("课程组id不能为空");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -120,11 +93,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "老师详情-直播课购买学员信息", httpMethod="POST", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/student", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<LiveCourseGroupStudentVo>> student(@Valid @RequestBody LiveCourseGroupStudentSearch query) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          IPage<LiveCourseGroupStudentVo> liveCourseGroupVoIPage = courseGroupService
 | 
	
		
			
				|  |  |                  .selectAdminLiveStudentPage(PageUtil.getPage(query), query);
 | 
	
		
			
				|  |  |          return succeed(PageUtil.pageInfo(liveCourseGroupVoIPage));
 | 
	
	
		
			
				|  | @@ -135,10 +103,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/{courseGroupId}")
 | 
	
		
			
				|  |  |      public HttpResponseResult<List<LiveCourseGroupPlanVo>> student(@ApiParam(value = "课程组编号ID", required = true)
 | 
	
		
			
				|  |  |                                                                                @PathVariable("courseGroupId") Long courseGroupId) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          if (courseGroupId == null) {
 | 
	
		
			
				|  |  |              return failed("课程组id不能为空");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -150,11 +114,6 @@ public class AdminCourseGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "学生详情-直播课详情-学生上课状态", httpMethod="POST", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      @PostMapping(value="/live/student/course", consumes="application/json", produces="application/json")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<LiveCourseGroupStudentCourseVo>> studentCourse(@Valid @RequestBody LiveCourseGroupStudentCourseSearch query) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null || sysUser.getId() == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          IPage<LiveCourseGroupStudentCourseVo> liveCourseGroupStudentCourseVoIPage = courseGroupService
 | 
	
		
			
				|  |  |                  .selectAdminLiveStudentCoursePage(PageUtil.getPage(query), query);
 | 
	
		
			
				|  |  |          return succeed(PageUtil.pageInfo(liveCourseGroupStudentCourseVoIPage));
 |