moonsflyer 5 месяцев назад
Родитель
Сommit
3f932832d1
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      app/common/service/pay/MixedPayService.php

+ 6 - 0
app/common/service/pay/MixedPayService.php

@@ -28,6 +28,7 @@ use app\common\model\AfterSale;
 use app\common\service\after_sale\AfterSaleService;
 use app\common\logic\AccountLogLogic;
 use app\common\model\User;
+use app\common\model\Order;
 use think\facade\Db;
 
 /**
@@ -140,6 +141,11 @@ class MixedPayService extends BasePayService
                     "[" . date('Y-m-d H:i:s') . "] 余额扣除成功,扣除金额: {$balanceAmount}" . PHP_EOL,
                     FILE_APPEND | LOCK_EX
                 );
+
+                Order::update([
+                    'balance_amount' =>  $balanceAmount
+                ], ['id' => $order['id']]);
+
             }
 
             // 创建微信支付订单(金额为剩余需要支付的金额)