|
@@ -7,6 +7,7 @@ import com.yonge.cooleshow.biz.dal.dto.CheckCourseTimeDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.ShareProfitParam;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.ShareProfitParam;
|
|
import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
|
|
import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.service.AppVersionInfoService;
|
|
import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
|
|
import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
|
|
import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
|
|
import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
|
|
import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
|
|
@@ -14,9 +15,11 @@ import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.ShareProfitVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.ShareProfitVo;
|
|
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;
|
|
|
|
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import com.yonge.toolset.base.page.PageInfo;
|
|
import com.yonge.toolset.base.page.PageInfo;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -43,6 +46,8 @@ public class TeacherCourseGroupController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private AppVersionInfoService appVersionInfoService;
|
|
@ApiOperation("直播课详情")
|
|
@ApiOperation("直播课详情")
|
|
@GetMapping("/queryLiveCourseInfo")
|
|
@GetMapping("/queryLiveCourseInfo")
|
|
public HttpResponseResult<LiveCourseInfoVo> queryLiveCourseInfo(@ApiParam(value = "课程组id", required = true) @RequestParam(value = "groupId") Long groupId) {
|
|
public HttpResponseResult<LiveCourseInfoVo> queryLiveCourseInfo(@ApiParam(value = "课程组id", required = true) @RequestParam(value = "groupId") Long groupId) {
|
|
@@ -55,13 +60,29 @@ public class TeacherCourseGroupController extends BaseController {
|
|
@ApiImplicitParam(name = "groupStatus", dataType = "String", value = "课程组状态 ING(进行中) NOT_SALE(未开售,未上架) APPLY(报名中,销售中) COMPLETE(已完成)"),
|
|
@ApiImplicitParam(name = "groupStatus", dataType = "String", value = "课程组状态 ING(进行中) NOT_SALE(未开售,未上架) APPLY(报名中,销售中) COMPLETE(已完成)"),
|
|
@ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),
|
|
@ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),
|
|
@ApiImplicitParam(name = "rows", dataType = "Integer", value = "每页数量"),
|
|
@ApiImplicitParam(name = "rows", dataType = "Integer", value = "每页数量"),
|
|
|
|
+ @ApiImplicitParam(name = "myself", dataType = "Boolean", value = "查看我自己的直播课"),
|
|
|
|
+ @ApiImplicitParam(name = "version", dataType = "String", value = "版本"),
|
|
|
|
+ @ApiImplicitParam(name = "platform", dataType = "Integer", value = "平台"),
|
|
})
|
|
})
|
|
@ApiOperation("分页查询直播课课程组列表")
|
|
@ApiOperation("分页查询直播课课程组列表")
|
|
@PostMapping("/queryPageCourseGroup")
|
|
@PostMapping("/queryPageCourseGroup")
|
|
public HttpResponseResult<PageInfo<CourseGroupVo>> queryPageLiveCourseGroup(@RequestBody Map<String, Object> param) {
|
|
public HttpResponseResult<PageInfo<CourseGroupVo>> queryPageLiveCourseGroup(@RequestBody Map<String, Object> param) {
|
|
- Long teacherId = WrapperUtil.toLong(param, "teacherId");
|
|
|
|
- teacherId = Optional.ofNullable(teacherId).orElseGet(() -> getSysUser().getId());
|
|
|
|
- param.put("teacherId", teacherId);
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Boolean myself = MapUtils.getBoolean(param,"myself");
|
|
|
|
+ if (myself == null || myself) {
|
|
|
|
+ Long teacherId = WrapperUtil.toLong(param, "teacherId");
|
|
|
|
+ teacherId = Optional.ofNullable(teacherId).orElseGet(() -> getSysUser().getId());
|
|
|
|
+ param.put("teacherId", teacherId);
|
|
|
|
+ } else {
|
|
|
|
+ YesOrNoEnum auditVersion = YesOrNoEnum.NO;
|
|
|
|
+ if (param.get("platform") != null && param.get("version") != null) {
|
|
|
|
+ auditVersion = appVersionInfoService.getAppAuditVersion(param.get("platform").toString(),param.get("version").toString());
|
|
|
|
+ }
|
|
|
|
+ param.put("auditVersion",auditVersion);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
return succeed(courseGroupService.queryPageLiveCourseGroup(param));
|
|
return succeed(courseGroupService.queryPageLiveCourseGroup(param));
|
|
}
|
|
}
|
|
|
|
|