feat : catering

This commit is contained in:
2025-03-14 10:05:12 +08:00
parent 3aa241350c
commit 747e37fc86
11 changed files with 210 additions and 18 deletions

View File

@@ -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;
}
/**