From 368815b4e012bc3b31be44a519d4ad54780269a1 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 16 May 2024 15:34:27 +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 | 4 +++- app/common/logic/PayNotifyLogic.php | 3 ++- app/common/service/PushService.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/api/controller/order/RetailOrderController.php b/app/api/controller/order/RetailOrderController.php index 97fc5e5..5e92b5f 100644 --- a/app/api/controller/order/RetailOrderController.php +++ b/app/api/controller/order/RetailOrderController.php @@ -163,6 +163,7 @@ class RetailOrderController extends BaseApiController Redis::send('send-code-pay', ['number'=>$order['number']]); return $this->success('用户支付中'); } + $result['create_time']=$order['create_time']; return $this->success('', $result); break; default: @@ -238,7 +239,8 @@ class RetailOrderController extends BaseApiController Redis::send('send-code-pay', ['number'=>$order['number']]); return $this->success('用户支付中'); } - return $this->success('支付成功',['order_id'=>$order['order_id']]); + $result['create_time']=$order['create_time']; + return $this->success('', $result); break; default: return $this->fail('支付方式错误'); diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 288bd08..b166a25 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -107,7 +107,8 @@ class PayNotifyLogic extends BaseLogic } if ($order->pay_type == 9) { - PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'cash_register','msg'=>'您有一笔订单已支付']); + $extra['create_time']=$order['create_time']; + PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'cash_register','msg'=>'您有一笔订单已支付','data'=>$extra]); } else { PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'store_merchant','msg'=>'您有一笔新的订单']); } diff --git a/app/common/service/PushService.php b/app/common/service/PushService.php index c495e20..83b42a1 100644 --- a/app/common/service/PushService.php +++ b/app/common/service/PushService.php @@ -16,7 +16,7 @@ class PushService public static function push($subscription, $uid, $content) { $api = new Api( - 'http://127.0.0.1:3232', + getenv('PUSH_URL'), config('plugin.webman.push.app.app_key'), config('plugin.webman.push.app.app_secret') );