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

@@ -5,9 +5,11 @@ declare(strict_types=1);
namespace App\Controller\Admin;
use App\Middleware\Admin\JwtAuthMiddleware;
use App\Service\Admin\Catering\Meal\CycleListService as MealCycleListService;
use App\Service\Admin\Catering\Meal\CheckService;
use App\Service\Admin\Catering\Option\CompleteListService;
use App\Service\Admin\Catering\Option\CompletePrintService;
use App\Service\Admin\Catering\Meal\CycleListService as MealCycleListService;
use APP\Service\Admin\Catering\Meal\CateringService as MealCateringService;
use App\Service\Admin\Catering\Option\CycleListService as OptionCycleListService;
use App\Service\Admin\Catering\Option\CateringService as OptionCateringService;
use App\Service\Admin\Catering\Option\PrintService;
@@ -24,6 +26,12 @@ use Psr\Container\NotFoundExceptionInterface;
])]
class CateringController
{
/**
* 套餐周期配餐列表
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: "meal/cycle_list", methods: "GET")]
#[Scene(scene: "meal_cycle_list")]
public function getMealCycleList()
@@ -31,6 +39,12 @@ class CateringController
return (new MealCycleListService)->handle();
}
/**
* 自选周期配餐列表
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: "option/cycle_list", methods: "GET")]
#[Scene(scene: "option_cycle_list")]
public function getOptionCycleList()
@@ -38,6 +52,10 @@ class CateringController
return(new OptionCycleListService)->handle();
}
/**
* 套餐剩余数量
* @return array
*/
#[RequestMapping(path: "meal/remain_count", methods: "GET")]
#[Scene(scene: "meal_remain_count")]
public function remainMealCateringCount()
@@ -45,6 +63,10 @@ class CateringController
return (new MealCycleListService)->remainCount();
}
/**
* 自选剩余数量
* @return array
*/
#[RequestMapping(path: "option/remain_count", methods: "GET")]
#[Scene(scene: "option_remain_count")]
public function remainOptionCateringCount()
@@ -52,14 +74,28 @@ class CateringController
return (new OptionCycleListService)->remainCount();
}
/**
* @return array
*/
#[RequestMapping(path: "meal/spu_list", methods: "GET")]
#[Scene(scene: "meal_spu_list")]
public function getMealGoodsList()
{
return (new MealCycleListService)->skuList();
}
#[RequestMapping(path: "meal/catering", methods: "GET")]
#[Scene(scene: "meal_catering")]
public function mealCatering()
{
return (new MealCateringService)->handle();
}
#[RequestMapping(path: "meal/catering/finish_check", methods: "GET")]
#[Scene(scene: "meal_catering_finish_check")]
public function mealFinishCheck()
{
return (new CheckService)->handle();
}
/**