feat: sku

This commit is contained in:
2025-01-22 11:37:42 +08:00
parent 7f09afacaf
commit 911c4fcf70
3 changed files with 43 additions and 10 deletions

View File

@@ -7,19 +7,30 @@ use App\Service\Api\Good\MealListService;
use App\Service\Api\Good\OptionalListService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
#[Controller(prefix: 'api/good')]
class GoodController extends AbstractController
{
/**
* @return array[]
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'optional',methods: 'GET')]
public function optional()
public function optional(): array
{
return (new OptionalListService)->handle();
}
/**
* @return array[]
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'meal',methods: 'GET')]
public function meal()
public function meal(): array
{
return (new MealListService)->handle();
}