feat: spu
This commit is contained in:
@@ -71,6 +71,7 @@ class SpuService extends BaseService
|
||||
->where('city_id',$cityId)
|
||||
->where('kitchen_id',$kitchenId)
|
||||
->where('is_del',GoodCode::SPU_IS_NO_DEL)
|
||||
->where('type',$this->request->input('type'))
|
||||
->paginate($limit)
|
||||
->toArray();
|
||||
|
||||
@@ -152,6 +153,8 @@ class SpuService extends BaseService
|
||||
$insertModel->sub_title = $this->request->input('sub_title','');
|
||||
$insertModel->category_id = $this->request->input('category_id');
|
||||
$insertModel->saleable = $this->request->input('saleable');
|
||||
$insertModel->type = $this->request->input('type');
|
||||
$insertModel->sort = $this->request->input('sort');
|
||||
|
||||
if (!$insertModel->save()) throw new ErrException('添加菜品失败');
|
||||
|
||||
@@ -214,6 +217,8 @@ class SpuService extends BaseService
|
||||
$info->sub_title = $this->request->input('sub_title','');
|
||||
$info->category_id = $this->request->input('category_id');
|
||||
$info->saleable = $this->request->input('saleable');
|
||||
$info->type = $this->request->input('type');
|
||||
$info->sort = $this->request->input('sort');
|
||||
|
||||
if (!$info->save()) throw new ErrException('修改菜品失败');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user