diff --git a/src/main/java/com/peanut/modules/book/controller/UserEbookBuyController.java b/src/main/java/com/peanut/modules/book/controller/UserEbookBuyController.java index 491d0add..c3b67c89 100644 --- a/src/main/java/com/peanut/modules/book/controller/UserEbookBuyController.java +++ b/src/main/java/com/peanut/modules/book/controller/UserEbookBuyController.java @@ -121,6 +121,7 @@ public class UserEbookBuyController { wrapper.selectAll(BookEntity.class); wrapper.leftJoin(UserEbookBuyEntity.class,UserEbookBuyEntity::getBookId,BookEntity::getId); wrapper.eq(UserEbookBuyEntity::getUserId,userId); + wrapper.groupBy(UserEbookBuyEntity::getBookId); Page bookEntityPage = bookDao.selectJoinPage(new Page(page, limit), BookEntity.class, wrapper); return R.ok().put("page",bookEntityPage); }