update producer

This commit is contained in:
2026-02-06 09:14:43 +08:00
parent 31ddc426fd
commit 3cfbaa0ac7
4 changed files with 298 additions and 5 deletions
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Platform\Tmall\Producer;
use Hyperf\Amqp\Annotation\Producer;
use App\Platform\OrderProducer;
#[Producer('tmall.exchange', 'product.tmall')]
class TmallProductProducer extends OrderProducer
{
protected string $exchange = 'tmall.exchange';
protected string|array $routingKey = 'product.tmall';
protected function buildMessage(array $data): array
{
$parent_meta = parent::buildMessage($data);
$parent_meta['platform'] = 'tmall';
$parent_meta['data_type'] = 'product';
$parent_meta['meta']['source_system'] = 'tmall_api';
return $parent_meta;
}
}