This commit is contained in:
wangjinlei
2023-09-22 11:46:09 +08:00
parent c4cc7fc129
commit 207d336f1e

View File

@@ -204,13 +204,19 @@ public class BookController {
for (UserEbookBuyEntity b :bookids){
bids.add(b.getBookId());
}
Integer start = (page-1)*limit;
QueryWrapper<BookEntity> wrapper = new QueryWrapper<>();
wrapper.eq("t.can_listen",1);
wrapper.notIn("t1.Book_id",bids);
List<BookEntity> bookEntities = bookDao.queryUserListenBooksNobuy(wrapper,start,limit);
Integer count = bookDao.queryUserListenBooksNobuyCount(wrapper);
return R.ok().put("books",bookEntities).put("count",count);
wrapper.eq("can_listen",1);
wrapper.notIn("id",bids);
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<BookEntity>(page, limit), wrapper);
// Integer start = (page-1)*limit;
// QueryWrapper<BookEntity> wrapper = new QueryWrapper<>();
// wrapper.eq("t.can_listen",1);
// wrapper.notIn("t1.Book_id",bids);
// List<BookEntity> bookEntities = bookDao.queryUserListenBooksNobuy(wrapper,start,limit);
// Integer count = bookDao.queryUserListenBooksNobuyCount(wrapper);
return R.ok().put("page",bookEntityPage);
}
/**