|
|
@@ -347,8 +347,10 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
try{
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
//根据店铺id查询该店铺的优惠券,状态是开启领取的券
|
|
|
- List<LifeDiscountCoupon> lifeDiscountCoupons = lifeDiscountCouponMapper.selectList(new LambdaQueryWrapper<LifeDiscountCoupon>().eq(LifeDiscountCoupon::getStoreId, storeId).eq(LifeDiscountCoupon::getGetStatus, "1") //还有库存
|
|
|
- .ge(LifeDiscountCoupon::getEndGetDate, LocalDate.now()).orderByDesc(LifeDiscountCoupon::getCreatedTime));
|
|
|
+ List<LifeDiscountCoupon> lifeDiscountCoupons = lifeDiscountCouponMapper.selectList(new LambdaQueryWrapper<LifeDiscountCoupon>()
|
|
|
+ .eq(LifeDiscountCoupon::getStoreId, storeId).eq(LifeDiscountCoupon::getGetStatus, "1") //还有库存
|
|
|
+ .ge(LifeDiscountCoupon::getEndGetDate, LocalDate.now())
|
|
|
+ .orderByDesc(LifeDiscountCoupon::getAttentionCanReceived));
|
|
|
//根据优惠券列表查询该优惠券是否领取过
|
|
|
for (LifeDiscountCoupon lifeDiscountCoupon : lifeDiscountCoupons) {
|
|
|
LifeDiscountCouponVo lifeDiscountCouponVo = new LifeDiscountCouponVo();
|