| | |
| | | import com.dsh.course.entity.TCourse; |
| | | import com.dsh.course.entity.TCoursePackageType; |
| | | import com.dsh.course.feignclient.model.ExerciseVideo; |
| | | import com.dsh.course.model.BaseVo; |
| | | import com.dsh.course.model.CoursePackageList; |
| | | import com.dsh.course.model.CoursePackageListVo; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.service.TCoursePackageService; |
| | | import com.dsh.course.service.TCoursePackageTypeService; |
| | | import com.dsh.course.service.TCourseService; |
| | |
| | | |
| | | |
| | | @PostMapping("/course/queryList") |
| | | public List<ExerciseVideo> queryStuCourseAfterVideos(List<Integer> courseIds){ |
| | | public List<ExerciseVideo> queryStuCourseAfterVideos(@RequestBody List<Integer> courseIds){ |
| | | List<ExerciseVideo> videos = new ArrayList<>(); |
| | | List<TCourse> list = courseService.list(new QueryWrapper<TCourse>() |
| | | .in("id", courseIds) |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/course/queryCoursePackageType") |
| | | @ApiOperation(value = "获取课程类型列表", tags = {"APP-加入玩湃"}) |
| | | @ApiOperation(value = "获取课程类型列表", tags = {"APP-课程列表"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<List<BaseVo>> queryCoursePackageType(){ |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/course/queryCourseList") |
| | | @ApiOperation(value = "获取课程列表", tags = {"APP-加入玩湃"}) |
| | | @ApiOperation(value = "获取课程列表", tags = {"APP-课程列表"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/course/queryCourseInfo") |
| | | @ApiOperation(value = "获取课程详情", tags = {"APP-课程列表"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "课包id", name = "id", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "经度", name = "lon", dataType = "string", required = true), |
| | | @ApiImplicitParam(value = "纬度", name = "lat", dataType = "string", required = true), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<CoursePackageInfo> queryCourseInfo(@RequestBody Integer id, @RequestBody String lon, @RequestBody String lat){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | CoursePackageInfo coursePackageInfo = coursePackageService.queryCourseInfo(uid, id, lon, lat); |
| | | return ResultUtil.success(coursePackageInfo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public ResultUtil paymentCourse(@RequestBody PaymentCourseVo paymentCourseVo){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return coursePackageService.paymentCourse(uid, paymentCourseVo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | } |