From 06a0407d11acd3c613969d1454640eb58643acc5 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Mon, 14 Nov 2022 15:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=BE=E5=A4=87=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/DeviceController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/DeviceController.php b/app/Http/Controllers/DeviceController.php index dae32a2..fc9f140 100644 --- a/app/Http/Controllers/DeviceController.php +++ b/app/Http/Controllers/DeviceController.php @@ -89,6 +89,8 @@ class DeviceController extends Controller $baseIds = AgriculturalBase::where('parent_id', $parent)->pluck('id')->toArray(); if(count($baseIds) > 0){ $query->whereIn('agricultural_base_id', $baseIds); + }else{ + $query->where('agricultural_base_id', 0); } } //如果查了镇街就不查指定基地了