feat : site
This commit is contained in:
@@ -103,6 +103,7 @@ class SiteRequest extends FormRequest
|
||||
'limit',
|
||||
'query_driver_name',
|
||||
'query_driver_city_id',
|
||||
'query_driver_id'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class SiteService extends BaseService
|
||||
$query->where('kitchen_id', $kitchenId);
|
||||
})
|
||||
->when($driverId = $this->request->input('query_driver_id'), function ($query) use ($driverId) {
|
||||
$query->where('driver_id', $driverId);
|
||||
$query->where('delivered_id', $driverId);
|
||||
})
|
||||
->when(!empty($createTimeStart) && !empty($createTimeEnd), function ($query) use ($createTimeStart, $createTimeEnd) {
|
||||
$query->whereBetween('create_time', [$createTimeStart, $createTimeEnd]);
|
||||
@@ -369,6 +369,9 @@ class SiteService extends BaseService
|
||||
->when($cityId > 0, function ($query) use ($cityId) {
|
||||
$query->whereIn('section_id', $this->adminSectionModel->getIdsByCityId($cityId));
|
||||
})
|
||||
->when($id = $this->request->input('query_driver_id'), function ($query) use ($id) {
|
||||
$query->where('id', $id);
|
||||
})
|
||||
->paginate($limit,['chinese_name','id','mobile','status'])->toArray();
|
||||
|
||||
return $this->return->success('success',$list);
|
||||
|
||||
Reference in New Issue
Block a user