跳到主要内容

第七天、点播管理模块(一)

一、后台管理系统-点播管理模块

1、点播管理模块需求

添加点播课程,包含课程基本信息,课程章节,课程小结和最终发布

image-20220225165732112

1.1、创建课程相关表

image-20220225144807295

2、环境搭建

2.1、生成相关代码

image-20220225135430130

3、功能实现-课程列表

实现分页条件查询点播课程功能

image-20220225165549771

3.1、开发课程列表接口

编写CourseController

@Api(tags = "课程管理接口")
@RestController
@RequestMapping(value="/admin/vod/course")
public class CourseController {

@Autowired
private CourseService courseService;

@ApiOperation(value = "获取分页列表")
@GetMapping("{page}/{limit}")
public Result index(
@ApiParam(name = "page", value = "当前页码", required = true)
@PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Long limit,
@ApiParam(name = "courseVo", value = "查询对象", required = false)
CourseQueryVo courseQueryVo) {
Page<Course> pageParam = new Page<>(page, limit);
Map<String,Object> map = courseService.findPage(pageParam, courseQueryVo);
return Result.ok(map);
}
}