|
@@ -7,6 +7,7 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.CheckCourseTimeDto;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.LiveCourseGroupSearch;
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.search.LiveCourseGroupStudentCourseSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.LiveCourseGroupStudentSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.AlbumFavorite;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
|
|
@@ -19,6 +20,7 @@ import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
import com.yonge.cooleshow.common.page.PageInfo;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -45,11 +47,28 @@ public class CourseGroupController extends BaseController {
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
- @ApiOperation(value = "直播课列表", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
+ @ApiOperation(value = "老师直播课列表", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
@PostMapping(value="/live/list", consumes="application/json", produces="application/json")
|
|
|
- public HttpResponseResult<PageInfo<LiveCourseGroupVo>> list(@Valid @RequestBody LiveCourseGroupSearch query) {
|
|
|
+ public HttpResponseResult<PageInfo<LiveCourseGroupVo>> teacherList(@Validated(value = LiveCourseGroupSearch.TeacherGroup.class)
|
|
|
+ @RequestBody LiveCourseGroupSearch query) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (sysUser == null) {
|
|
|
+ if (sysUser == null || sysUser.getId() == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ query.setCourseType(CourseScheduleEnum.LIVE);
|
|
|
+
|
|
|
+ IPage<LiveCourseGroupVo> liveCourseGroupVoIPage = courseGroupService
|
|
|
+ .selectAdminLivePage(PageUtil.getPage(query), query);
|
|
|
+ return succeed(PageUtil.pageInfo(liveCourseGroupVoIPage));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "学生直播课列表", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
+ @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);
|
|
@@ -79,11 +98,11 @@ public class CourseGroupController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "直播课购买学员信息", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
+ @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) {
|
|
|
+ if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|
|
|
}
|
|
|
|
|
@@ -93,7 +112,7 @@ public class CourseGroupController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "教学计划")
|
|
|
+ @ApiOperation(value = "老师详情-教学计划")
|
|
|
@PostMapping(value="/live/{courseGroupId}")
|
|
|
public HttpResponseResult<List<LiveCourseGroupPlanVo>> student(@ApiParam(value = "课程组编号ID", required = true)
|
|
|
@PathVariable("courseGroupId") Long courseGroupId) {
|
|
@@ -105,8 +124,22 @@ public class CourseGroupController extends BaseController {
|
|
|
return failed("课程组id不能为空");
|
|
|
}
|
|
|
|
|
|
- List<LiveCourseGroupPlanVo> LiveCourseGroupPlanVoList = courseGroupService.selectAdminLivePlan(courseGroupId);
|
|
|
- return succeed(LiveCourseGroupPlanVoList);
|
|
|
+ return succeed(courseGroupService.selectAdminLivePlan(courseGroupId));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @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));
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|