|
@@ -121,13 +121,13 @@ public class BookController extends BaseController {
|
|
|
/**
|
|
|
* 获取章节列表
|
|
|
*
|
|
|
- * @param book
|
|
|
+ * @param bookContentVO
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/chapterList")
|
|
|
- public Result<List<Chapter>> getChaptersByPageAndRow(@RequestBody Map<String, String> book) {
|
|
|
+ public Result<List<Chapter>> getChaptersByPageAndRow(@RequestBody BookContentVO bookContentVO) {
|
|
|
|
|
|
- List<Chapter> chapterList = bookService.getChaptersByBookId(book.get("bookId"));
|
|
|
+ List<Chapter> chapterList = bookService.getChaptersByBookId(bookContentVO.getBookId());
|
|
|
if (CollectionUtils.isEmpty(chapterList)) {
|
|
|
return Result.failure(ResultCode.FAIL.getCode(), "哎呀~没有数据啦~");
|
|
|
} else {
|
|
@@ -138,13 +138,14 @@ public class BookController extends BaseController {
|
|
|
/**
|
|
|
* 获取章节书籍内容
|
|
|
*
|
|
|
- * @param book 书籍id,章节id
|
|
|
+ * @param bookContentVO 书籍id,章节id
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/content")
|
|
|
- public Result<BookContent> getBookContentByChapter(@RequestBody Map<String, String> book) {
|
|
|
+ public Result<BookContent> getBookContentByChapter(@RequestBody BookContentVO bookContentVO) {
|
|
|
|
|
|
- BookContent content = bookService.getContentByContentId(book.get("bookId"), book.get("contentId"));
|
|
|
+ BookContent content = bookService.getContentByContentId(bookContentVO.getBookId(),
|
|
|
+ bookContentVO.getContentId());
|
|
|
if (content == null || "null".equals(content)) {
|
|
|
return Result.failure(ResultCode.FAIL.getCode(), "哎呀~没有数据啦~");
|
|
|
}
|