新版
This commit is contained in:
@@ -204,13 +204,19 @@ public class BookController {
|
|||||||
for (UserEbookBuyEntity b :bookids){
|
for (UserEbookBuyEntity b :bookids){
|
||||||
bids.add(b.getBookId());
|
bids.add(b.getBookId());
|
||||||
}
|
}
|
||||||
Integer start = (page-1)*limit;
|
|
||||||
QueryWrapper<BookEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<BookEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("t.can_listen",1);
|
wrapper.eq("can_listen",1);
|
||||||
wrapper.notIn("t1.Book_id",bids);
|
wrapper.notIn("id",bids);
|
||||||
List<BookEntity> bookEntities = bookDao.queryUserListenBooksNobuy(wrapper,start,limit);
|
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<BookEntity>(page, limit), wrapper);
|
||||||
Integer count = bookDao.queryUserListenBooksNobuyCount(wrapper);
|
// Integer start = (page-1)*limit;
|
||||||
return R.ok().put("books",bookEntities).put("count",count);
|
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user