From a7504f3660390583194cf82019b01ba008326081 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 11 May 2024 17:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/order/RetailOrderController.php | 8 ++++---- config/thinkorm.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/controller/order/RetailOrderController.php b/app/api/controller/order/RetailOrderController.php index d92845e..8fb583a 100644 --- a/app/api/controller/order/RetailOrderController.php +++ b/app/api/controller/order/RetailOrderController.php @@ -95,18 +95,18 @@ class RetailOrderController extends BaseApiController $order = OrderLogic::createOrder($cartId, $addressId, null, $params); if ($order != false) { switch ($pay_type) { - case PayEnum::WECHAT_PAY: + case PayEnum::BALANCE_PAY: //余额支付 $user = User::where('id', $this->request->userId)->find(); $res = RetailOrderLogic::payBalance($user, $order); if (RetailOrderLogic::hasError()) { + return $this->fail(RetailOrderLogic::getError()); + } else { $res = RetailOrderLogic::paySuccess($order, ['money' => $order['actual']]); if (RetailOrderLogic::hasError()) { - } else { return $this->fail(RetailOrderLogic::getError()); } - } else { - return $this->fail(RetailOrderLogic::getError()); + return $this->success('余额支付成功'); } break; case PayEnum::WECHAT_PAY: diff --git a/config/thinkorm.php b/config/thinkorm.php index 77eb1a6..9be215f 100644 --- a/config/thinkorm.php +++ b/config/thinkorm.php @@ -23,7 +23,7 @@ return [ // 断线重连 'break_reconnect' => true, // 关闭SQL监听日志 - 'trigger_sql' => true, + 'trigger_sql' => false, // 自定义分页类 'bootstrap' => '' ],