feat: sku
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user