From 9dde487cb9abadcab3512ca5dfecfc77b318b689 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 17 Jun 2024 15:12:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(order):=20=E4=BF=AE=E6=AD=A3=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E7=A0=81=E5=9B=BE=E7=89=87=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=B7=AF=E5=BE=84=E5=8F=8A=E9=87=87=E8=B4=AD=E6=AC=BE?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 2 +- app/common/logic/PayNotifyLogic.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 5896de4e4..10b196451 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -194,7 +194,7 @@ class OrderLogic extends BaseLogic $generator = new BarcodeGeneratorPNG(); $barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128); $findPath = '/image/barcode/'.time().'.png'; - $savePath = 'public'.$findPath; + $savePath = public_path().$findPath; file_put_contents($savePath, $barcode); $_order['verify_img'] = $findPath; Db::startTrans(); diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index e51603b15..98556c7c2 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -97,7 +97,7 @@ class PayNotifyLogic extends BaseLogic public static function purchase_funds($orderSn, $extra = []) { $order = StoreOrder::where('order_id', $orderSn)->findOrEmpty(); - $user = User::where('id', $extra['uid'])->find(); + $user = User::where('id', $order['uid'])->find(); if ($user['purchase_funds'] < $order['pay_price']) { throw new \Exception('采购款不足'); }