添加用户购买的书籍
This commit is contained in:
@@ -114,6 +114,31 @@ public class BookTeachLikeAndCommentController {
|
||||
}
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部评论列表
|
||||
*/
|
||||
@RequestMapping("/getAllCommentList")
|
||||
public R getAllCommentList(@RequestBody Map<String, Object> params) {
|
||||
MPJLambdaWrapper<BookTeachCommentEntity> wrapper = new MPJLambdaWrapper<>();
|
||||
wrapper.eq(BookTeachCommentEntity::getDelFlag,0);
|
||||
IPage<BookTeachCommentEntity> page = commentService.page(
|
||||
new Query<BookTeachCommentEntity>().getPage(params),wrapper);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据内容查询评论
|
||||
*/
|
||||
@RequestMapping("/getCommentByContent")
|
||||
public R getCommentByContent(@RequestBody Map<String, Object> params) {
|
||||
MPJLambdaWrapper<BookTeachCommentEntity> wrapper = new MPJLambdaWrapper<>();
|
||||
wrapper.like(BookTeachCommentEntity::getContent,params.get("content"));
|
||||
IPage<BookTeachCommentEntity> page = commentService.page(
|
||||
new Query<BookTeachCommentEntity>().getPage(params),wrapper);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
//递归查询子评论
|
||||
private void getSonComment(BookTeachCommentEntity comment){
|
||||
LambdaQueryWrapper<BookTeachCommentEntity> w = new LambdaQueryWrapper();
|
||||
|
||||
Reference in New Issue
Block a user