From 8f8b06d059ceb879dc8cb864572f4be245aeb28b Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Tue, 29 Sep 2020 18:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=A8=A1=E5=9E=8B=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=BA=97=E9=93=BA=E6=97=B6=E5=A4=B1=E6=95=88=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E4=B9=9F=E8=83=BD=E8=A2=AB=E6=9F=A5=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/GoodsService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/GoodsService.php b/app/Service/v3/Implementations/GoodsService.php index 27aae25..da6626a 100644 --- a/app/Service/v3/Implementations/GoodsService.php +++ b/app/Service/v3/Implementations/GoodsService.php @@ -86,7 +86,9 @@ class GoodsService implements GoodsServiceInterface public function detail($goodsId) { - $res = Goods::query()->with('store')->where('id',$goodsId)->first(); + $res = Goods::query()->with(['store' => function($query){ + $query->withoutGlobalScope('normal'); + }])->where('id',$goodsId)->first(); return $res; }