From f017fc993831fe3772c1f1514f471fff983ff5cd Mon Sep 17 00:00:00 2001 From: liapples Date: Mon, 6 Sep 2021 09:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0whereIn=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E7=AB=9E=E6=A0=87=E4=BA=A7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminAgent/Renderable/SelectProduct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/AdminAgent/Renderable/SelectProduct.php b/app/AdminAgent/Renderable/SelectProduct.php index e8194bb..ec52e5d 100644 --- a/app/AdminAgent/Renderable/SelectProduct.php +++ b/app/AdminAgent/Renderable/SelectProduct.php @@ -24,7 +24,7 @@ class SelectProduct extends LazyRenderable $grid->disableBatchDelete(); $grid->disableBatchActions(); - $grid->model()->where('status', ProductStatus::ON_SALE); + $grid->model()->where('status', ProductStatus::ON_SALE)->whereIn('agent_id', [0, Admin::user()->id]); $grid->quickSearch(['title', 'supplier.name'])->placeholder('搜索产品名称、供应商'); $grid->column('id');