|
|
@@ -1872,7 +1872,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
try {
|
|
|
LocalDate now = LocalDate.now();
|
|
|
|
|
|
- // 查询该店铺所有开启领取的优惠券(有效期内、有库存、未删除)
|
|
|
+ // 查询该店铺所有开启领取的优惠券(有效期内、有库存、未删除、收藏可领)
|
|
|
LambdaQueryWrapper<LifeDiscountCoupon> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(LifeDiscountCoupon::getStoreId, storeId)
|
|
|
.eq(LifeDiscountCoupon::getGetStatus, 1) // 开启领取
|
|
|
@@ -1880,6 +1880,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
.gt(LifeDiscountCoupon::getSingleQty, 0) // 有库存
|
|
|
.ge(LifeDiscountCoupon::getEndGetDate, now) // 未过期
|
|
|
.eq(LifeDiscountCoupon::getCouponStatus, 1) // 正式状态(非草稿)
|
|
|
+ .eq(LifeDiscountCoupon::getAttentionCanReceived, 1) // 收藏可领(只有为1时才可以领取)
|
|
|
.isNotNull(LifeDiscountCoupon::getCouponType) // 必须有优惠券类型
|
|
|
.orderByDesc(LifeDiscountCoupon::getCreatedTime); // 按创建时间降序
|
|
|
|