From ac9eb17056811cf9c3ecf56ec286b23a5aebd17a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 18 Jun 2024 10:44:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(store=5Forder):=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=B1=BB=E5=9E=8B=E5=92=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?ID=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/controller/store_order/StoreOrderController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/store/controller/store_order/StoreOrderController.php b/app/store/controller/store_order/StoreOrderController.php index ba689ab31..639433742 100644 --- a/app/store/controller/store_order/StoreOrderController.php +++ b/app/store/controller/store_order/StoreOrderController.php @@ -127,6 +127,7 @@ class StoreOrderController extends BaseAdminController $pay_type = (int)$this->request->post('pay_type'); $addressId = (int)$this->request->post('address_id'); $auth_code = $this->request->post('auth_code'); //微信支付条码 + $uid=$this->request->post('uid'); $params = $this->request->post(); if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY && $pay_type != PayEnum::PURCHASE_FUNDS) { return $this->fail('支付条码不能为空'); @@ -135,8 +136,8 @@ class StoreOrderController extends BaseAdminController return $this->fail('购物车商品不能超过100个'); } $user = null; - if ($pay_type == PayEnum::PURCHASE_FUNDS) { - $user = User::where('id', $this->request->post('uid'))->find(); + if ($uid) { + $user = User::where('id', $uid)->find(); } $params['store_id'] = $this->request->adminInfo['store_id']; //当前登录的店铺id,用于判断是否是当前店铺的订单 $order = StoreOrderLogic::createOrder($cartId, $addressId, $user, $params); @@ -144,7 +145,7 @@ class StoreOrderController extends BaseAdminController switch ($pay_type) { case PayEnum::PURCHASE_FUNDS: //采购款支付 - PayNotifyLogic::handle('purchase_funds', $order['order_id'], ['uid' => $this->request->post('uid')]); + PayNotifyLogic::handle('purchase_funds', $order['order_id'], ['uid' => $uid]); return $this->success('采购款支付成功', ['id' => $order['id']]); case PayEnum::CASH_PAY: