diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index eef62540..a5fd887a 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -196,6 +196,11 @@ class OrderService // 订单支付金额=商品总额-券折扣金额-会员折扣金额+邮费 $totalAmount = $productsTotalAmount - $couponDiscountAmount - $vipDiscountAmount; + //如果有砍价优惠 + if ($bargainOrder) { + $totalAmount -= $bargainOrder->bargain_price; + } + if ($totalAmount < 0) { $totalAmount = 0; }