seven hai 1 semana
pai
achega
7fbbd5886f
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      app/Services/PaymentOrderService.php

+ 3 - 2
app/Services/PaymentOrderService.php

@@ -590,7 +590,6 @@ class PaymentOrderService extends BaseService
                 $data['status'] = self::STATUS_SUCCESS;
                 $res = self::model()::where(['order_no' => $params['orderNo']])->update($data);
                 if ($res) {
-                    DB::commit();
                     $text = "✅ 提现通知 \n";
                     $text .= "提现平台:{$info->bank_name} \n";
                     $text .= "收款人:{$info->account} \n";
@@ -613,7 +612,6 @@ class PaymentOrderService extends BaseService
                 // 记录退款日志
                 BalanceLogService::addLog($memberId, $amount, $balance, $available_balance, '三方提现', $info->id, '提现失败退款');
                 if ($res) {
-                    DB::commit();
                     $text = "❌ 提现通知 \n";
                     $text .= "提现平台:{$info->bank_name} \n";
                     $text .= "收款人:{$info->account} \n";
@@ -623,6 +621,9 @@ class PaymentOrderService extends BaseService
                     self::sendMessage($chat_id, $text);
                 }
             }
+
+            DB::commit();
+
         } catch (Exception $e) {
             DB::rollBack();
             // 回滚失败,需要记录告警,人工干预