|
@@ -562,23 +562,14 @@ public class CourseController extends AppBaseController{
|
|
|
|
|
|
@ApiOperation("获取历史评论数据")
|
|
|
@GetMapping("/getComments")
|
|
|
- public ResponseResult<PageInfo<FsCourseWatchCommentVO>> getCourseWatchComments(@ApiParam(value = "页码", required = true) @RequestParam Integer pageNum,
|
|
|
- @ApiParam(value = "每页大小", required = true) @RequestParam Integer pageSize,
|
|
|
- @ApiParam(value = "课程id", required = true) @RequestParam Long courseId,
|
|
|
- @ApiParam(value = "视频id", required = true) @RequestParam Long videoId)
|
|
|
+ public ResponseResult<PageInfo<FsCourseWatchCommentVO>> getCourseWatchComments(FsCourseWatchCommentListParam param)
|
|
|
{
|
|
|
//获取配置信息中需要查询的数据条数
|
|
|
-// String json = configService.selectConfigByKey("course.config");
|
|
|
-// CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
-
|
|
|
- FsCourseWatchCommentListParam param = new FsCourseWatchCommentListParam();
|
|
|
- param.setPageNum(pageNum);
|
|
|
- param.setPageSize(pageSize);
|
|
|
- param.setCourseId(courseId);
|
|
|
- param.setVideoId(videoId);
|
|
|
-// param.setListNum(config.getViewCommentNum() != null && config.getViewCommentNum() != 0 ? config.getViewCommentNum() : 200);
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
+ param.setListNum(config.getViewCommentNum() != null && config.getViewCommentNum() != 0 ? config.getViewCommentNum() : 200);
|
|
|
|
|
|
- PageHelper.startPage(pageNum, pageSize);
|
|
|
+ PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
List<FsCourseWatchCommentVO> list = courseWatchCommentService.selectH5CourseWatchComments(param);
|
|
|
PageInfo<FsCourseWatchCommentVO> pageInfo = new PageInfo<>(list);
|
|
|
return ResponseResult.ok(pageInfo);
|