Ver Fonte

wesmiler

wesmiler há 1 semana atrás
pai
commit
c622ac7c60

+ 2 - 2
app/Services/Api/OrderService.php

@@ -330,8 +330,8 @@ class OrderService extends BaseService
             'bd_score' => $bdScoreTotal, // 折扣后商品总价(不含运费)
             'bd_score' => $bdScoreTotal, // 折扣后商品总价(不含运费)
             'profit_total' => $profitTotal, // 折扣后商品总价(不含运费)
             'profit_total' => $profitTotal, // 折扣后商品总价(不含运费)
             'pay_money' => $orderTotal, // 折扣后商品总价(不含运费)
             'pay_money' => $orderTotal, // 折扣后商品总价(不含运费)
-            'pay_total' => $type==2?moneyFormat($orderTotal + $bdScoreTotal,2):$orderTotal, // 折扣后商品总价(不含运费)
-            'pay_status' => $type==2? 30 : 10, // 折扣后商品总价(不含运费)
+            'pay_total' => $type==2 && $bdScoreTotal>0?moneyFormat($orderTotal + $bdScoreTotal,2):$orderTotal, // 折扣后商品总价(不含运费)
+            'pay_status' => $type==2 && $bdScoreTotal>0? 30 : 10, // 折扣后商品总价(不含运费)
             'discount_point' => $discountPoint,
             'discount_point' => $discountPoint,
             'discount_total' => $discountTotal, // 折扣金额
             'discount_total' => $discountTotal, // 折扣金额
             'delivery_fee' => $deliveryFee, // 运费
             'delivery_fee' => $deliveryFee, // 运费

+ 1 - 0
app/Services/Common/OrderService.php

@@ -376,6 +376,7 @@ class OrderService extends BaseService
             return ['code' => 1, 'msg' => '订单状态不正确'];
             return ['code' => 1, 'msg' => '订单状态不正确'];
         }
         }
 
 
+        DB::beginTransaction();
         $updateData = [
         $updateData = [
             'status' => 2, // 已付款
             'status' => 2, // 已付款
             'transaction_id' => $transactionId ?: 'PAY' . time() . rand(1000, 9999),
             'transaction_id' => $transactionId ?: 'PAY' . time() . rand(1000, 9999),