From aa2c1463002812d0afea0c25a0cf17508e141ce6 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 15 Jun 2024 11:07:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E6=AC=BE?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/order/OrderController.php | 7 ++++--- app/common/logic/PayNotifyLogic.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index a436e98f1..0d6e336ff 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -183,10 +183,11 @@ class OrderController extends BaseApiController $user=User::where('id',$this->userId)->find(); $order = OrderLogic::createOrder($cartId, $addressId, $user, $params); - if($order['pay_price'] <= 0){ - $pay_type = 3; - } + if ($order != false) { + if($order['pay_price'] <= 0){ + $pay_type = 3; + } switch ($pay_type) { case PayEnum::PURCHASE_FUNDS: //采购款支付 diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 82e4e1c33..e8eefc5cf 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -111,7 +111,7 @@ class PayNotifyLogic extends BaseLogic $user->save(); $capitalFlowDao = new CapitalFlowLogic($user); - $capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order['pay_price']); + $capitalFlowDao->userExpense('user_order_purchase_pay', 'order', $order['id'], $order['pay_price']); self::afterPay($order); Redis::send('push-platform-print', ['id' => $order['id']], 60); PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);