feat: sku

This commit is contained in:
2025-02-11 11:14:35 +08:00
parent 0cdf5ee52d
commit 88ee75143e
2 changed files with 32 additions and 4 deletions

View File

@@ -13,13 +13,20 @@ use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middlewares;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
#[Controller(prefix: 'api/order')]
//#[Middlewares([
// JwtAuthMiddleware::class,
//])]
#[Middlewares([
JwtAuthMiddleware::class,
])]
class OrderController extends AbstractController
{
/**
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'check_cart',methods: 'post')]
#[Scene(scene: 'check_cart')]
public function checkCart()
@@ -27,6 +34,11 @@ class OrderController extends AbstractController
return (new CheckCartService)->handle();
}
/**
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'confirmation_order',methods: 'post')]
#[Scene(scene: 'confirmation_order')]
public function confirmationOrder()
@@ -34,6 +46,11 @@ class OrderController extends AbstractController
return (new ConfirmationOrderService)->handle();
}
/**
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'place_order',methods: 'post')]
#[Scene(scene: 'place_order')]
public function placeOrder()