This commit is contained in:
wangjinlei
2023-09-28 16:28:34 +08:00
parent 4849defaef
commit fb7016d471
5 changed files with 30 additions and 35 deletions

View File

@@ -692,7 +692,10 @@ public class BookController {
LambdaQueryWrapper<BookEntity> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(BookEntity::getDelFlag,0);
wrapper1.notIn(BookEntity::getId,bookIds);
wrapper1.eq(BookEntity::getState,1);
if(bookIds.size()>0){
wrapper1.notIn(BookEntity::getId,bookIds);
}
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper1);
for (BookEntity b : bookEntityPage.getRecords()){
b.setProductId(shopProudictBookService.getProductByBookId(b.getId()));