feat: chef
This commit is contained in:
@@ -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('该厨房已禁用');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user