From 642aa37fbc837bbe7a82ee65f44fa243574b1f9b Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Fri, 22 Dec 2023 14:39:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E8=BD=AE=E8=BD=A6=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=92=8C=E6=9C=80=E8=BF=9110=E7=AC=94?= =?UTF-8?q?=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/dataview/Logistics.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controller/api/dataview/Logistics.php b/app/controller/api/dataview/Logistics.php index d55642a1..342651cf 100755 --- a/app/controller/api/dataview/Logistics.php +++ b/app/controller/api/dataview/Logistics.php @@ -205,9 +205,13 @@ class Logistics extends BaseController public function logisticsMapCount() { $courierId = $this->request->param('courier_id'); + $latestOrder = []; + $latestTenOrder = []; // 最近一次取货地址 最新一笔的配送中订单的取货地址 $latestLogistics = Db::connect('logistics')->name('logistics')->where(['status'=>1, 'courier_id' => $courierId])->order('id', 'desc')->find(); - + if (empty($latestLogistics)) { + return app('json')->success(compact('latestOrder', 'latestTenOrder')); + } $latestOrderInfo = Db::name('store_order')->where(['order_id'=>$latestLogistics['order_id']])->find(); $merchant = Db::name('merchant')->where(['mer_id'=>$latestOrderInfo['mer_id']])->find();