From 6ba088cbda7480e42eb834ba366e1168fc7273bc Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 8 Jun 2024 20:47:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(order):=20=E4=BF=AE=E6=94=B9=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=94=AF=E4=BB=98=E9=80=BB=E8=BE=91=E4=B8=8E=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/order/OrderController.php | 3 +-- app/common/logic/PaymentLogic.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index d52ba531..894f1833 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -306,12 +306,11 @@ class OrderController extends BaseApiController //微信小程序支付 $redirectUrl = $params['redirect'] ?? '/pages/payment/payment'; if ($addressId != $order['address_id']) { - $address = UserAddress::where(['address_id' => $addressId, 'uid' => Request()->userId])->find(); + $address = UserAddress::where(['id' => $addressId, 'uid' => Request()->userId])->find(); if ($address) { $_order['real_name'] = $address['real_name']; $_order['user_phone'] = $address['phone']; $_order['user_address'] = $address['detail']; - $_order['address_id'] = $addressId; StoreOrder::where(['id' => $order_id, 'uid' => Request()->userId])->update($_order); } } diff --git a/app/common/logic/PaymentLogic.php b/app/common/logic/PaymentLogic.php index 2f282aa0..98b0c7fb 100644 --- a/app/common/logic/PaymentLogic.php +++ b/app/common/logic/PaymentLogic.php @@ -43,7 +43,7 @@ class PaymentLogic extends BaseLogic $order['pay_price'] = $order['price']; } switch ($payWay) { - case PayEnum::WECHAT_PAY: + case PayEnum::WECHAT_PAY_MINI: $auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty(); $order = [ 'out_trade_no' => $paySn,