feat : refund
This commit is contained in:
@@ -4,8 +4,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Controller\Api;
|
namespace App\Controller\Api;
|
||||||
|
|
||||||
|
use App\Amqp\Producer\RefundOrderProducer;
|
||||||
use App\Controller\AbstractController;
|
use App\Controller\AbstractController;
|
||||||
use App\Middleware\Api\JwtAuthMiddleware;
|
use App\Middleware\Api\JwtAuthMiddleware;
|
||||||
|
use App\Service\Api\Order\RefundOrderService;
|
||||||
use App\Service\Api\Pay\PlacePayService;
|
use App\Service\Api\Pay\PlacePayService;
|
||||||
use Hyperf\HttpServer\Annotation\Controller;
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||||
@@ -29,6 +31,6 @@ class PayController extends AbstractController
|
|||||||
#[Scene(scene: 'refund')]
|
#[Scene(scene: 'refund')]
|
||||||
public function refund()
|
public function refund()
|
||||||
{
|
{
|
||||||
|
return (new RefundOrderService)->handle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class RefundOrderService extends BaseService
|
|||||||
{
|
{
|
||||||
//todo 考虑是否枷锁
|
//todo 考虑是否枷锁
|
||||||
$orderId = (int)$this->request->input('order_id');
|
$orderId = (int)$this->request->input('order_id');
|
||||||
$type = (int)$this->request->input('type');
|
$type = (int)$this->request->input('order_type');
|
||||||
|
|
||||||
$orderInfo = $this->orderModel->getInfoById($orderId);
|
$orderInfo = $this->orderModel->getInfoById($orderId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user