feat : refund

This commit is contained in:
2025-03-27 10:47:31 +08:00
parent 1265bdcce9
commit f9d3511ed6
7 changed files with 128 additions and 23 deletions

View File

@@ -365,15 +365,17 @@ trait OrderTrait
/**
* @param int $orderId
* @param int $orderStatus
* @param array $refundGoodIds
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
protected function sendStockMq(int $orderId,int $orderStatus): void
protected function sendStockMq(int $orderId,int $orderStatus,array $refundGoodIds = []): void
{
$message = new OrderGoodStockProducer([
'order_id' => $orderId,
'type' => $orderStatus
'type' => $orderStatus,
'refund_goods' => $refundGoodIds
]);
$producer = ApplicationContext::getContainer()->get(Producer::class);
$producer->produce($message);