This commit is contained in:
wangjinlei
2023-09-25 09:07:12 +08:00
parent 3cf0726bac
commit 51340eb1c0
2 changed files with 36 additions and 1 deletions

View File

@@ -196,7 +196,7 @@ public class BookForumArticlesServiceController {
public R getCommentByForum(@RequestParam Integer forumId,@RequestParam Integer limit,@RequestParam Integer page){
LambdaQueryWrapper<BookForumCommentEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookForumCommentEntity::getDelflag,0);
wrapper.gt(BookForumCommentEntity::getPid,0);
wrapper.eq(BookForumCommentEntity::getPid,0);
wrapper.orderByAsc(BookForumCommentEntity::getCreateTime);
Page<BookForumCommentEntity> bookForumCommentEntityPage = bookForumCommenService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
for (BookForumCommentEntity b : bookForumCommentEntityPage.getRecords()){
@@ -207,6 +207,24 @@ public class BookForumArticlesServiceController {
return R.ok().put("page",bookForumCommentEntityPage);
}
/**
* 获取子聊天项目
* @return
*/
@RequestMapping("/getCommentZ")
public R getCommentZ(@RequestParam Integer pid,@RequestParam Integer limit,@RequestParam Integer page){
LambdaQueryWrapper<BookForumCommentEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookForumCommentEntity::getPid,pid);
wrapper.eq(BookForumCommentEntity::getDelflag,0);
wrapper.orderByAsc(BookForumCommentEntity::getCreateTime);
Page<BookForumCommentEntity> bookForumCommentEntityPage = bookForumCommenService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
for (BookForumCommentEntity b : bookForumCommentEntityPage.getRecords()){
b.setUser(userService.getById(b.getUserid()));
b.setPuser(userService.getById(b.getPuserid()));
}
return R.ok().put("page",bookForumCommentEntityPage);
}
@RequestMapping("/pushMsgToForum")
public R pushMsgToForum(
@@ -228,6 +246,20 @@ public class BookForumArticlesServiceController {
}
/**
* 添加书评项目
* @return
*/
@RequestMapping("/addForum")
public R addForum(@RequestParam Integer userId,@RequestParam String content){
return null;
}
@RequestMapping("/desc/{page}")
public R Descupd(@RequestParam Map<String, Object> params,@PathVariable("page") Integer page){
HashMap<Object, Object> map = new HashMap<>();

View File

@@ -51,6 +51,9 @@ public class BookForumArticlesEntity {
*/
@TableField("bookid")
private Integer bookid;
@TableField("fine_work")
private Integer finework;
/**
*开始时间
*/