6
0
Fork 0

调整进货补贴查询不存在的数据置为空

release
vine_liutk 2022-04-12 15:55:44 +08:00
parent c09a691ddc
commit 1fb919cafa
1 changed files with 3 additions and 0 deletions

View File

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