feat : catering
This commit is contained in:
@@ -15,6 +15,7 @@ use App\Cache\Redis\Common\ConfigCache;
|
||||
use App\Constants\Common\RoleCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Model\AdminUser;
|
||||
use App\Model\Caterer;
|
||||
use App\Model\DriverSequence;
|
||||
use App\Model\Site;
|
||||
use App\Model\Sku;
|
||||
@@ -76,6 +77,12 @@ abstract class CateringBaseService extends BaseService
|
||||
#[Inject]
|
||||
protected AdminUser $adminUserModel;
|
||||
|
||||
/**
|
||||
* @var Caterer
|
||||
*/
|
||||
#[Inject]
|
||||
protected Caterer $catererModel;
|
||||
|
||||
/**
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -118,10 +125,14 @@ abstract class CateringBaseService extends BaseService
|
||||
$this->cycleId = (int)$cycleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function getKitchenId(): void
|
||||
{
|
||||
//todo 自选配餐员工要绑定厨房 套餐配餐员工要绑定每日套餐
|
||||
$this->kitchenId = 1;
|
||||
$caterInfo = $this->catererModel->where('user_id',$this->adminId)->first();
|
||||
if (empty($caterInfo) || empty($caterInfo->kitchen_id)) throw new ErrException('账号异常/该账号没有绑定厨房');
|
||||
$this->kitchenId = $caterInfo->kitchen_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user