|
@@ -1,11 +1,13 @@
|
|
package com.yonge.cooleshow.admin.controller;
|
|
package com.yonge.cooleshow.admin.controller;
|
|
|
|
|
|
|
|
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupDetailSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupDetailSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.CourseGroupSearch;
|
|
import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
|
|
import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
|
|
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
|
|
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
|
|
import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
|
|
import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
|
|
-import com.yonge.cooleshow.biz.dal.support.PageUtil;
|
|
|
|
|
|
+import com.yonge.toolset.mybatis.support.PageUtil;
|
|
import com.yonge.cooleshow.biz.dal.vo.*;
|
|
import com.yonge.cooleshow.biz.dal.vo.*;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
@@ -13,10 +15,12 @@ import com.yonge.toolset.base.page.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.http.HttpStatus;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -30,6 +34,8 @@ import java.util.Map;
|
|
public class CourseGroupController extends BaseController {
|
|
public class CourseGroupController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private CourseGroupService courseGroupService;
|
|
private CourseGroupService courseGroupService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@ApiOperation(value = "课程组管理-陪练课",notes = "{\n" +
|
|
@ApiOperation(value = "课程组管理-陪练课",notes = "{\n" +
|
|
" \"subjectId\":20,\n" +
|
|
" \"subjectId\":20,\n" +
|
|
@@ -129,22 +135,42 @@ public class CourseGroupController extends BaseController {
|
|
" \"status\":\"ING\"\n" +
|
|
" \"status\":\"ING\"\n" +
|
|
"}")
|
|
"}")
|
|
@PostMapping(value = "/piano")
|
|
@PostMapping(value = "/piano")
|
|
- public HttpResponseResult<PageInfo<CourseGroupPianoVo>> selectLiveGroupInfo(@RequestBody CourseGroupSearch search) {
|
|
|
|
|
|
+ public HttpResponseResult<PageInfo<CourseGroupPianoVo>> selectPianoGroup(@RequestBody CourseGroupSearch search) {
|
|
return succeed(PageUtil.pageInfo(courseGroupService.selectPianoGroup(PageUtil.getPage(search), search)));
|
|
return succeed(PageUtil.pageInfo(courseGroupService.selectPianoGroup(PageUtil.getPage(search), search)));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "课程组管理-琴房课-详情",notes = "{\n" +
|
|
@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" +
|
|
|
|
|
|
+ " \"courseGroupId\":334,\n" +
|
|
|
|
+ " \"search\":\"\",\n" +
|
|
|
|
+ " \"status\":\"\",\n" +
|
|
|
|
+ " \"startTime\":null,\n" +
|
|
|
|
+ " \"endTime\":null,\n" +
|
|
|
|
+ " \"teacherSign\":null,\n" +
|
|
|
|
+ " \"studentSign\":null\n" +
|
|
"}")
|
|
"}")
|
|
@PostMapping(value = "/piano/detail")
|
|
@PostMapping(value = "/piano/detail")
|
|
public HttpResponseResult<PageInfo<CourseGroupPianoDetailVo>> selectPianoGroupDetail(@Validated @RequestBody CourseGroupDetailSearch search) {
|
|
public HttpResponseResult<PageInfo<CourseGroupPianoDetailVo>> selectPianoGroupDetail(@Validated @RequestBody CourseGroupDetailSearch search) {
|
|
return succeed(PageUtil.pageInfo(courseGroupService.selectPianoGroupDetail(PageUtil.getPage(search), search)));
|
|
return succeed(PageUtil.pageInfo(courseGroupService.selectPianoGroupDetail(PageUtil.getPage(search), search)));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "课程组管理-琴房课-详情-学员名单")
|
|
|
|
+ @GetMapping(value = "/piano/student")
|
|
|
|
+ public HttpResponseResult<List<StudentSignVo>> studentSign(@NotNull Long courseId) {
|
|
|
|
+ return succeed(courseGroupService.studentSign(courseId,null));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "学员管理-琴房课",notes = "{\n" +
|
|
|
|
+ " \"subjectId\":20,\n" +
|
|
|
|
+ " \"search\":\"师\",\n" +
|
|
|
|
+ " \"status\":\"ING\"\n" +
|
|
|
|
+ "}")
|
|
|
|
+ @PostMapping(value = "/piano/student")
|
|
|
|
+ public HttpResponseResult<PageInfo<CourseGroupPianoVo>> selectPianoGroupStudent(@RequestBody CourseGroupSearch search) {
|
|
|
|
+ SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
|
+ if (user == null || null == user.getId()) {
|
|
|
|
+ return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
|
+ }
|
|
|
|
+ search.setStudentId(user.getId());
|
|
|
|
+ return succeed(PageUtil.pageInfo(courseGroupService.selectPianoGroupStudent(PageUtil.getPage(search), search)));
|
|
|
|
+ }
|
|
}
|
|
}
|