From df87e9c00b020d59cbd1160cb1db5c7e4656070c Mon Sep 17 00:00:00 2001 From: lq Date: Mon, 30 Sep 2024 10:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8F=90=E7=8E=B0=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/DivideAccountController.php | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/admin/controllers/base/DivideAccountController.php b/admin/controllers/base/DivideAccountController.php index 2442392..dabcd21 100644 --- a/admin/controllers/base/DivideAccountController.php +++ b/admin/controllers/base/DivideAccountController.php @@ -547,30 +547,6 @@ class DivideAccountController extends BaseAdminController $chargeCpr = $this->getChargeCashPayRecordStatusByOrderNo($orderNo); $chargeCpr->status = $status; $chargeCpr->saveOrFail(); - if ($status == 2) { - if (empty($chargeCash)) { - throw new Exception('金额不能为空'); - } - $account = CashAccount::find()->where([ - 'user_id' => $chargeCpr->store_id, - 'user_type' => $chargeCpr->type - ])->one(); - // 从冻结金额中减去充值金额,并将结果赋值回冻结金额 - $account->frozen_cash = bcsub($account->frozen_cash, bcsub($chargeCash, $chargeCpr->charge_cash, 2), 2); - // 减少账户可用余额 - $account->able_cash = bcsub($account->able_cash, $chargeCpr->charge_cash, 2); - - $account->saveOrFail(); - - - $platformAccount = CashAccount::find()->where([ - 'user_id' => 0, - 'user_type' => 2 - ])->one(); - $platformAccount->able_cash = bcsub($platformAccount->able_cash, $chargeCpr->charge_cash, 2); - $platformAccount->charge_cash = bcadd($platformAccount->charge_cash, $chargeCpr->charge_cash, 2); - $platformAccount->saveOrFail(); - } } /**