From 6e5badd9698cb59e53b66ee1627a22bfbbba4a10 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 25 Jun 2024 16:55:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=94=B6=E9=93=B6?= =?UTF-8?q?=E5=8F=B0=E6=94=AF=E4=BB=98=E5=8A=9F=E8=83=BD=E5=8F=8A=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index b03b41809..57876439b 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -216,31 +216,32 @@ class PayNotifyLogic extends BaseLogic if ($order->isEmpty() || $order->paid == PayEnum::ISPAID) { return true; } + $order->status = 1; + $order->paid = 1; + $order->pay_time = time(); + if($order['is_storage']==1){ + $order->status=2; + UserProductStorageLogic::add($order); + } if ($order->pay_type != 10) { $order->pay_price = bcdiv($extra['amount']['payer_total'], 100, 2); - $order->paid = 1; - $order->pay_time = time(); - $order->status = 1; - $order->save(); } else { $extra['transaction_id'] = time(); } $user = User::where('id', $order['uid'])->find(); if ($order->pay_type == OrderEnum::CASHIER_ORDER_PAY || $order->pay_type == OrderEnum::CASHIER_ORDER_ALI_PAY) { //收银台支付 $order->status = 2; - $order->save(); self::afterPay($order, $extra['transaction_id']); } else { $capitalFlowDao = new CapitalFlowLogic($user); //微信支付和用户余额无关 $capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order->pay_price, '', 1, $order['store_id']); } - + $order->save(); self::dealProductLog($order); if ($order['shipping_type'] == 3) { self::descStock($order['id']); } - if (!empty($extra['payer']['openid']) && $order->pay_type == 7) { Redis::send('push-delivery', ['order_id' => $order['order_id'], 'openid' => $extra['payer']['openid']], 4); }