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