feat: chef

This commit is contained in:
2025-01-14 15:23:53 +08:00
parent 78cb99a6d2
commit 0ef8cc8742

View File

@@ -30,7 +30,7 @@ class SpuService extends BaseService
{ {
use GetUserInfoTrait,OssTrait; use GetUserInfoTrait,OssTrait;
private $userInfo; // private $userInfo;
private int $cityId; private int $cityId;
@@ -46,13 +46,13 @@ class SpuService extends BaseService
#[Inject] #[Inject]
protected Sku $skuModel; protected Sku $skuModel;
public function __construct() // public function __construct()
{ // {
parent::__construct(); // parent::__construct();
//
$this->userInfo = $this->getUserInfo($this->adminId); //// $this->userInfo = $this->getUserInfo($this->adminId);
$this->cityId = (int)$this->userInfo['city_id']; //// $this->cityId = (int)$this->userInfo['city_id'];
} // }
/** /**
* @return array * @return array
@@ -181,6 +181,7 @@ class SpuService extends BaseService
{ {
$kitchenId = $this->request->input('kitchen_id'); $kitchenId = $this->request->input('kitchen_id');
$kitchenInfo = $this->kitchenModel->getInfoById($kitchenId); $kitchenInfo = $this->kitchenModel->getInfoById($kitchenId);
$this->cityId = $kitchenInfo->city_id;
if ($kitchenInfo->status == SiteCode::KITCHEN_DISABLE) throw new ErrException('该厨房已禁用'); if ($kitchenInfo->status == SiteCode::KITCHEN_DISABLE) throw new ErrException('该厨房已禁用');