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