用户优惠券列表
This commit is contained in:
parent
c659a887e7
commit
55f488db7f
|
|
@ -117,10 +117,10 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
|
|||
@Override
|
||||
public Page<MkShopCouponRecord> find(Long userId, Long shopId, Integer status) {
|
||||
Page<Object> page = PageUtil.buildPage();
|
||||
List<Long> shopUserIds = shopUserService.queryChain()
|
||||
.eq(ShopUser::getUserId, userId)
|
||||
List<Long> shopUserIds = shopUserService.listAs(new QueryWrapper().eq(ShopUser::getUserId, userId)
|
||||
.eq(ShopUser::getSourceShopId, shopId)
|
||||
.select(ShopUser::getId).listAs(Long.class);
|
||||
.select(ShopUser::getId), Long.class);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(shopUserIds)) {
|
||||
PageHelper.startPage(Math.toIntExact(page.getPageNumber()), Math.toIntExact(page.getPageSize()));
|
||||
return PageUtil.convert(new PageInfo<>(recordService.findByUser(shopUserIds, status)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue