Browse Source

优惠券

gorden 6 months ago
parent
commit
4f630e75ba
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/service/order/OrderService.php

+ 2 - 2
app/admin/service/order/OrderService.php

@@ -630,7 +630,7 @@ class OrderService
                     ];
                     Redis::set($cacheDiscountKey, json_encode($discountData,JSON_UNESCAPED_UNICODE));
                 } elseif (in_array($couponDetail->coupon_classify, ['年卡', '季卡', '月卡'])) {
-                    if (Redis::sIsMember($cacheKey, $couponId)) {
+                    if (Redis::sIsMember($cacheKey, $couponId) || Redis::sIsMember($cacheKey, $goodsId)) {
                         continue;
                     }
                     Redis::sAdd($cacheKey, $couponId);
@@ -775,7 +775,7 @@ class OrderService
                         $welfareBalance = 0;
                     }
                 } elseif (in_array($couponDetail->coupon_classify, ['年卡', '季卡', '月卡'])) {
-                    if (Redis::sIsMember($cacheKey, $couponId)) {
+                    if (Redis::sIsMember($cacheKey, $couponId) || Redis::sIsMember($cacheKey, $goodsId)) {
                         continue;
                     }
                     Redis::sAdd($cacheKey, $couponId);