26 lines
651 B
PHP
26 lines
651 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Platform\Tmall\Producer;
|
||
|
|
|
||
|
|
use Hyperf\Amqp\Annotation\Producer;
|
||
|
|
use App\Platform\OrderProducer;
|
||
|
|
|
||
|
|
#[Producer('tmall.exchange', 'refund.tmall')]
|
||
|
|
class TmallRefundProducer extends OrderProducer
|
||
|
|
{
|
||
|
|
protected string $exchange = 'tmall.exchange';
|
||
|
|
protected string|array $routingKey = 'refund.tmall';
|
||
|
|
|
||
|
|
protected function buildMessage(array $data): array
|
||
|
|
{
|
||
|
|
$parent_meta = parent::buildMessage($data);
|
||
|
|
$parent_meta['platform'] = 'tmall';
|
||
|
|
$parent_meta['data_type'] = 'refund';
|
||
|
|
$parent_meta['meta']['source_system'] = 'tmall_api';
|
||
|
|
|
||
|
|
return $parent_meta;
|
||
|
|
}
|
||
|
|
}
|