修改获取用户可听书列表bug
This commit is contained in:
@@ -119,12 +119,12 @@ public class UserEbookBuyController {
|
||||
*/
|
||||
@RequestMapping("/getUserCanlistenBooks")
|
||||
public R getUserCanlistenBooks(@RequestParam Integer userId,@RequestParam Integer limit,@RequestParam Integer page){
|
||||
MPJLambdaWrapper<BookEntity> wrapper = new MPJLambdaWrapper<BookEntity>();
|
||||
MPJLambdaWrapper<BookEntity> wrapper = new MPJLambdaWrapper<>();
|
||||
wrapper.selectAll(BookEntity.class);
|
||||
wrapper.leftJoin(UserEbookBuyEntity.class,UserEbookBuyEntity::getBookId,BookEntity::getId);
|
||||
wrapper.eq(UserEbookBuyEntity::getUserId,userId);
|
||||
wrapper.groupBy(UserEbookBuyEntity::getBookId);
|
||||
Page<BookEntity> bookEntityPage = bookDao.selectJoinPage(new Page<BookEntity>(page, limit), BookEntity.class, wrapper);
|
||||
Page<BookEntity> bookEntityPage = bookDao.selectPage(new Page<>(page, limit), wrapper);
|
||||
return R.ok().put("page",bookEntityPage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user