feat: chef

This commit is contained in:
2025-01-14 15:26:40 +08:00
parent 0ef8cc8742
commit 817effdc66

View File

@@ -133,11 +133,12 @@ class SpuService extends BaseService
$title = $this->request->input('title');
$this->checkInfo();
$info = $this->spuModel->getInfoByCityIdAndCycleId($this->cityId, $cycleInfo->id,$title);
if (!empty($info)) throw new ErrException('该菜品在当前城市已存在');
$this->checkInfo();
$insertModel = new Spu();
@@ -181,7 +182,7 @@ class SpuService extends BaseService
{
$kitchenId = $this->request->input('kitchen_id');
$kitchenInfo = $this->kitchenModel->getInfoById($kitchenId);
$this->cityId = $kitchenInfo->city_id;
$this->cityId = (int)$kitchenInfo->city_id;
if ($kitchenInfo->status == SiteCode::KITCHEN_DISABLE) throw new ErrException('该厨房已禁用');