From af562ee2b7f019de0bfcfc7246c985e176320b95 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 12 Aug 2023 14:18:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=AE=E5=A4=8D=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/order/StoreOrder.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index ebf35c80..af8ae4ee 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -23,10 +23,11 @@ use crmeb\basic\BaseController; use app\common\repositories\store\order\StoreCartRepository; use app\common\repositories\store\order\StoreGroupOrderRepository; use app\common\repositories\store\order\StoreOrderRepository; +use think\exception\ValidateException; use crmeb\services\ExpressService; use crmeb\services\LockService; +use think\facade\Db; use think\App; -use think\exception\ValidateException; use think\facade\Log; /** @@ -284,7 +285,10 @@ class StoreOrder extends BaseController public function logisticsCode($id) { - $order = $this->repository->getWhere(['order_id' => $id, 'uid' => $this->request->uid(), 'is_del' => 0]); + $storeInfo = Db::name('store_service')->where('uid', $this->request->uid())->find(); + if (!$storeInfo) + return app('json')->fail('商户信息有误'); + $order = $this->repository->getWhere(['order_id' => $id, 'mer_id' => $storeInfo['mer_id'], 'is_del' => 0]); if (!$order) return app('json')->fail('订单状态有误'); return app('json')->success(['qrcode' => $this->repository->logisticsQrcode($id, $order->order_sn)]);