-- 新版提交
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user