From c1023669fb8af24d6e76e6a954549314c8957c8b Mon Sep 17 00:00:00 2001 From: liapples Date: Fri, 17 Sep 2021 11:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=94=E7=A4=BA=E4=BA=A7=E5=93=81=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/AgentProductController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AgentProductController.php b/app/Http/Controllers/Api/AgentProductController.php index 3437542..21ce1b6 100644 --- a/app/Http/Controllers/Api/AgentProductController.php +++ b/app/Http/Controllers/Api/AgentProductController.php @@ -60,9 +60,9 @@ class AgentProductController extends Controller // TODO 优惠券查询待优化 if (AgentProduct::withTrashed()->where('agent_id', $this->agent_id)->count() === 0) { //演示产品用 - $where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE]; - } else { $where = ['id' => $id, 'status' => ProductStatus::ON_SALE]; + } else { + $where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE]; } $agent_product = AgentProduct::query() ->with(['coupon:tag,agent_product_id'])