|
|
@@ -6,6 +6,7 @@ use biz\ghs\classes\GhsClass;
|
|
|
use biz\product\classes\XjClass;
|
|
|
use biz\shop\classes\ShopClass;
|
|
|
use biz\shop\classes\ShopCouponClass;
|
|
|
+use biz\sj\classes\SjClass;
|
|
|
use biz\wx\classes\WxMessageClass;
|
|
|
use bizGhs\admin\classes\AdminClass;
|
|
|
use bizGhs\order\traits\OrderTrait;
|
|
|
@@ -186,6 +187,14 @@ class PurchaseClass extends BaseClass
|
|
|
$actPrice = bcsub($prePrice, $coupon->amount, 2);
|
|
|
$realPrice = $actPrice;
|
|
|
|
|
|
+ //红包的限制使用
|
|
|
+ $sj = SjClass::getById($sjId, true);
|
|
|
+ $parentShopId = $sj->parentShopId ?? 0;
|
|
|
+ $ghsShopId = $ghs['shopId'] ?? 0;
|
|
|
+ if (empty($parentShopId) || $parentShopId != $ghsShopId) {
|
|
|
+ util::fail('此商家不支持使用红包');
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|