-- 新版提交

This commit is contained in:
yc13649764453
2023-09-09 13:51:35 +08:00
parent 763e24b4e0
commit 0b193caa03
92 changed files with 3451 additions and 1120 deletions

View File

@@ -70,9 +70,10 @@ public class BookShelfController {
// 加入前判断数据库是否加入过 这本书
Integer integer = bookShelfService.getBaseMapper().selectCount(new QueryWrapper<BookShelfEntity>()
.eq("book_id", bookShelf.getBookId())
.eq("user_id", bookShelf.getUserId()));
System.out.println("bookShelf"+bookShelf);
if (integer > 0){
return R.error(500,"当前书籍已加入书架");
}
@@ -119,4 +120,16 @@ public class BookShelfController {
return R.ok().put("userBookshelf",userBookshelf);
}
/**
* 获取用户听书书架 getUserBookChapterRead
*/
@RequestMapping("/getUserBookChapterRead")
public R getUserBookChapterRead(@RequestParam Integer userId){
List<BookShelfVo> bookShelfVos = bookShelfService.getUserBookChapterRead(userId);
return R.ok().put("bookShelfVos",bookShelfVos);
}
}