浏览代码

获取该用户该店铺优惠券已领可用不可用列表

qxy 3 月之前
父节点
当前提交
ea44ad1466

+ 3 - 3
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponServiceImpl.java

@@ -455,8 +455,8 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
 
         //storeId(前台传进来的是团购id)
         //根据团购id获取门店id
-        LifeCoupon lifeCoupon = lifeCouponMapper.selectById(storeId);
-        String makeSureStoreId = lifeCoupon.getStoreId();
+//        LifeCoupon lifeCoupon = lifeCouponMapper.selectById(storeId);
+//        String makeSureStoreId = lifeCoupon.getStoreId();
 
         //查询可用的优惠券 1、当前优惠券没过使用期,2、当前优惠券为待使用,3、是该门店的券
         queryWrapper.eq(LifeDiscountCouponUser::getUserId, userLoginInfo.getUserId());
@@ -469,7 +469,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
             //查询该优惠券属于哪个店铺
             LifeDiscountCoupon lifeDiscountCoupon = lifeDiscountCouponMapper.selectById(lifeDiscountCouponUser.getCouponId());
             String couponStoreId = lifeDiscountCoupon.getStoreId();
-            if (couponStoreId.equals(makeSureStoreId)) {
+            if (couponStoreId.equals(storeId)) {
                 lifeDiscountCouponUsers.add(lifeDiscountCouponUser);
             }
         }