From 1fb919cafa2ebb9a661a1f3ade6af7925bd70587 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Tue, 12 Apr 2022 15:55:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=9B=E8=B4=A7=E8=A1=A5?= =?UTF-8?q?=E8=B4=B4=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BD=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/DealerPurchaseLogController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Admin/Controllers/DealerPurchaseLogController.php b/app/Admin/Controllers/DealerPurchaseLogController.php index 569c191e..2f2962b5 100644 --- a/app/Admin/Controllers/DealerPurchaseLogController.php +++ b/app/Admin/Controllers/DealerPurchaseLogController.php @@ -40,6 +40,9 @@ class DealerPurchaseLogController extends AdminController $user = User::where('phone', $phone)->first(); if ($user) { $grid->model()->where('path', 'like', '%-'.$user->id.'-%'); + } else { + //不存的手机号查询数据置为空 + $grid->model()->where('id', 0); } } $grid->model()->orderBy('id', 'desc');//默认ID倒叙