This commit is contained in:
mkm 2024-05-11 17:02:15 +08:00
parent f84e4d8f8d
commit a7504f3660
2 changed files with 5 additions and 5 deletions

View File

@ -95,18 +95,18 @@ class RetailOrderController extends BaseApiController
$order = OrderLogic::createOrder($cartId, $addressId, null, $params); $order = OrderLogic::createOrder($cartId, $addressId, null, $params);
if ($order != false) { if ($order != false) {
switch ($pay_type) { switch ($pay_type) {
case PayEnum::WECHAT_PAY: case PayEnum::BALANCE_PAY:
//余额支付 //余额支付
$user = User::where('id', $this->request->userId)->find(); $user = User::where('id', $this->request->userId)->find();
$res = RetailOrderLogic::payBalance($user, $order); $res = RetailOrderLogic::payBalance($user, $order);
if (RetailOrderLogic::hasError()) { if (RetailOrderLogic::hasError()) {
return $this->fail(RetailOrderLogic::getError());
} else {
$res = RetailOrderLogic::paySuccess($order, ['money' => $order['actual']]); $res = RetailOrderLogic::paySuccess($order, ['money' => $order['actual']]);
if (RetailOrderLogic::hasError()) { if (RetailOrderLogic::hasError()) {
} else {
return $this->fail(RetailOrderLogic::getError()); return $this->fail(RetailOrderLogic::getError());
} }
} else { return $this->success('余额支付成功');
return $this->fail(RetailOrderLogic::getError());
} }
break; break;
case PayEnum::WECHAT_PAY: case PayEnum::WECHAT_PAY:

View File

@ -23,7 +23,7 @@ return [
// 断线重连 // 断线重连
'break_reconnect' => true, 'break_reconnect' => true,
// 关闭SQL监听日志 // 关闭SQL监听日志
'trigger_sql' => true, 'trigger_sql' => false,
// 自定义分页类 // 自定义分页类
'bootstrap' => '' 'bootstrap' => ''
], ],