用户优惠券列表

This commit is contained in:
wangw 2025-09-24 15:16:51 +08:00
parent c659a887e7
commit 55f488db7f
1 changed files with 3 additions and 3 deletions

View File

@ -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)));