From 1d6db6a33fe07036f58d766d0454ecfc43d2c2be Mon Sep 17 00:00:00 2001 From: lq Date: Wed, 27 Nov 2024 14:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B3=E5=8F=B0=E6=8F=90?= =?UTF-8?q?=E7=8E=B0=E6=89=8B=E7=BB=AD=E8=B4=B9=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/EplpayCallbackController.php | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/member/modules/v1/controllers/EplpayCallbackController.php b/member/modules/v1/controllers/EplpayCallbackController.php index 73f0767..54c0d62 100644 --- a/member/modules/v1/controllers/EplpayCallbackController.php +++ b/member/modules/v1/controllers/EplpayCallbackController.php @@ -321,19 +321,18 @@ class EplpayCallbackController extends \yii\web\Controller $CashAccount->charge_cash = bcadd($CashAccount->charge_cash, $applyOrder->charge_cash, 2); $CashAccount->saveOrFail(); - if ($applyOrder->user_id != 0) { - // 扣除平台账户的金额 - $platformAccount = CashAccount::find()->where([ - 'user_id' => 0, - 'user_type' => 2 - ])->one(); - if (!$platformAccount) { - throw new Exception('平台账户不存在'); - } - $platformAccount->able_cash = bcsub($platformAccount->able_cash, $chargeCpr->charge_cash, 2); - $platformAccount->charge_cash = bcadd($platformAccount->charge_cash, $chargeCpr->charge_cash, 2); - $platformAccount->saveOrFail(); + + // 扣除平台账户的金额 + $platformAccount = CashAccount::find()->where([ + 'user_id' => 0, + 'user_type' => 2 + ])->one(); + if (!$platformAccount) { + throw new Exception('平台账户不存在'); } + $platformAccount->able_cash = bcsub($platformAccount->able_cash, $chargeCpr->charge_cash, 2); + $platformAccount->charge_cash = bcadd($platformAccount->charge_cash, $chargeCpr->charge_cash, 2); + $platformAccount->saveOrFail(); // 增加流水记录 $fundWater = new FundWater();