feat : refund

This commit is contained in:
2025-02-24 15:37:06 +08:00
parent c14901de4a
commit 5febca23aa
2 changed files with 4 additions and 2 deletions

View File

@@ -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();
} }
} }

View File

@@ -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);