From 5817de6cd94c4f41f28792abf0dfdc8276c6abc0 Mon Sep 17 00:00:00 2001 From: liapples Date: Wed, 20 Oct 2021 13:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E4=BE=9B=E5=BA=94=E5=95=86=E5=8A=A0?= =?UTF-8?q?=E9=92=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/WxpayController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/Api/WxpayController.php b/app/Http/Controllers/Api/WxpayController.php index 4d2202f..faf7db6 100644 --- a/app/Http/Controllers/Api/WxpayController.php +++ b/app/Http/Controllers/Api/WxpayController.php @@ -14,6 +14,7 @@ use App\Models\IndustryProduct; use App\Models\Order; use App\Models\Product; use App\Models\SettledOrder; +use App\Models\Supplier; use App\Models\UserMoneyLog; use EasyWeChat\Factory; use EasyWeChat\Kernel\Exceptions\Exception; @@ -338,6 +339,11 @@ class WxpayController $order->timeout = null; $order->save(); + //给供应商加钱 + $supplier = Supplier::find($order->supplier_id); + $supplier->balance = DB::raw('`balance` + ' . $money); + $supplier->save(); + //资金流水 IndustryPayLog::create([ 'agent_id' => $order->agent_id,