From 5837d30284a06fbe56f7598212d75a189d0e0d16 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 12 Aug 2023 10:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98=E6=88=90?= =?UTF-8?q?=E5=8A=9Fhandle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/listener/paySuccessOrder.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/listener/paySuccessOrder.php b/app/listener/paySuccessOrder.php index 9d5f1f88..ce95539e 100644 --- a/app/listener/paySuccessOrder.php +++ b/app/listener/paySuccessOrder.php @@ -29,6 +29,11 @@ class paySuccessOrder $this->event = $event; $this->finance = []; $this->index = 1; + //发起物流信息返回快递员手机 + $logisticsPhone = $this->sendLogistics($this->event['order']['order_id'], $this->event['order']['order_sn']); + //生成用户的收货码 + $this->generateLogisticsCode($this->event['order']['uid'], $this->event['order']['order_id'], $this->event['order']['order_sn'], $logisticsPhone); + Db::startTrans(); try { $financialRecordRepository = app()->make(FinancialRecordRepository::class); @@ -38,12 +43,6 @@ class paySuccessOrder if (!$merchant || $merchant['street_id'] == 0) { throw new \Exception('商户地址不存在', 200); } - - //发起物流信息返回快递员手机 - $logisticsPhone = $this->sendLogistics($this->event['order']['order_id'], $this->event['order']['order_sn']); - //生成用户的收货码 - $this->generateLogisticsCode($this->event['order']['uid'], $this->event['order']['order_id'], $this->event['order']['order_sn'], $logisticsPhone); - $this->streetId = $merchant['street_id']; $commission_rate = ($event['order']['commission_rate'] / 100);