feat : refund
This commit is contained in:
@@ -6,9 +6,11 @@ namespace App\Controller\Api;
|
||||
|
||||
use App\Controller\AbstractController;
|
||||
use App\Middleware\Api\JwtAuthMiddleware;
|
||||
use App\Service\Api\Order\CancelOrderService;
|
||||
use App\Service\Api\Order\CheckCartService;
|
||||
use App\Service\Api\Order\ConfirmationOrderService;
|
||||
use App\Service\Api\Order\PlaceOrderService;
|
||||
use App\Service\Api\Order\RefundOrderService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
@@ -57,4 +59,30 @@ class OrderController extends AbstractController
|
||||
{
|
||||
return (new PlaceOrderService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订单 type 1|2 good|balance
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
#[RequestMapping(path: 'cancel_order',methods: 'post')]
|
||||
#[Scene(scene: 'cancel_order')]
|
||||
public function cancelOrder()
|
||||
{
|
||||
return (new CancelOrderService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单退款(同理)
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
#[RequestMapping(path: 'refund_order',methods: 'post')]
|
||||
#[Scene(scene: 'refund_order')]
|
||||
public function refundOrder()
|
||||
{
|
||||
return (new RefundOrderService)->handle();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user