Merge remote-tracking branch 'origin/master'

This commit is contained in:
张松
2025-02-28 10:51:51 +08:00
10 changed files with 33 additions and 44 deletions

View File

@@ -91,12 +91,12 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
@Override
public Page<ShopActivateCouponRecord> find(Long userId, Long shopId, Integer status) {
Page<Object> page = PageUtil.buildPage();
PageHelper.startPage(Math.toIntExact(page.getPageNumber()),Math.toIntExact(page.getPageSize()));
List<Long> shopUserIds = shopUserService.queryChain()
.eq(ShopUser::getUserId, userId)
.eq(ShopUser::getShopId, shopId)
.select(ShopUser::getId).listAs(Long.class);
if (CollectionUtil.isNotEmpty(shopUserIds)) {
PageHelper.startPage(Math.toIntExact(page.getPageNumber()),Math.toIntExact(page.getPageSize()));
return PageUtil.convert(new PageInfo<>(couponRecordService.findByUser(shopUserIds, status)));
}
return new Page<>();