feat : admin
This commit is contained in:
@@ -169,15 +169,20 @@ class KitchenService extends BaseService
|
||||
*/
|
||||
public function info(): array
|
||||
{
|
||||
$data = $this
|
||||
->kitchenModel
|
||||
->where('id', $this->request->input('id'))
|
||||
->where('is_del', SiteCode::KITCHEN_NO_DEL)
|
||||
->first(['id','city_id','name','address','lng','lat','status']);
|
||||
$data = $this->kitchenModel
|
||||
->getInfoById((int)$this->request->input('id'));
|
||||
if (empty($data)) throw new AdminException('数据不存在');
|
||||
|
||||
$res = $data->toArray();
|
||||
$res['city_name'] = $this->systemCityModel->where('id',$data->city_id)->value('title');
|
||||
$res = [
|
||||
'id' => $data->id,
|
||||
'city_id' => $data->city_id,
|
||||
'name' => $data->name,
|
||||
'address' => $data->address,
|
||||
'lng' => $data->lng,
|
||||
'lat' => $data->lat,
|
||||
'status' => $data->status,
|
||||
'city_name' => $this->systemCityModel->where('id',$data->city_id)->value('title')
|
||||
];
|
||||
|
||||
return $this->return->success('success', $res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user