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倒叙