This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-02-18 17:15:00 +08:00
parent a314c6153e
commit 39924b5780
8 changed files with 20 additions and 22 deletions

View File

@@ -39,7 +39,7 @@ class DishService extends BaseService
$price = (double)$this->request->input('price');
$side_dish = $this->request->input('side_dish');
$flavor = $this->request->input('flavor');
$cycle_id = (int)$this->request->input('cycle_id');
$date = $this->request->input('date');
$city_id = (int)$this->request->input('city_id');
$kitchen_id = (int)$this->request->input('kitchen_id');
$chef_id = $this->userId;
@@ -51,7 +51,7 @@ class DishService extends BaseService
$dish ->price = $price;
$dish ->side_dish = $side_dish;
$dish ->flavor = $flavor;
$dish ->cycle_id = $cycle_id;
$dish ->date = $date;
$dish ->city_id = $city_id;
$dish ->kitchen_id = $kitchen_id;
$dish ->chef_id = $chef_id;
@@ -119,10 +119,9 @@ class DishService extends BaseService
$limit = (int)$this->request->input('limit');
$chef_id = $this->userId;
$list = $this->DishModel
->leftJoin('cycle','dish.cycle_id','=','cycle.id')
->where('chef_id', $chef_id)
->orderBy('cycle.dates','desc')
->paginate($limit,['dish.*','cycle.dates'])->toArray();
->orderBy('date','desc')
->paginate($limit)->toArray();
return $this->return->success('success',$list);
}