update shopee entity parse
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Platform\Shopee\Producer;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use App\Platform\OrderProducer;
|
||||
|
||||
#[Producer('shopee.exchange', 'inventory.shopee')]
|
||||
class ShopeeInventoryProducer extends OrderProducer
|
||||
{
|
||||
protected string $exchange = 'shopee.exchange';
|
||||
protected string|array $routingKey = 'inventory.shopee';
|
||||
|
||||
protected function buildMessage(array $data): array
|
||||
{
|
||||
$parent_meta = parent::buildMessage($data);
|
||||
$parent_meta['platform'] = 'shopee';
|
||||
$parent_meta['data_type'] = 'inventory';
|
||||
$parent_meta['meta']['source_system'] = 'shopee_api';
|
||||
|
||||
return $parent_meta;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Platform\Shopee\Producer;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use App\Platform\OrderProducer;
|
||||
|
||||
#[Producer('shopee.exchange', 'product.shopee')]
|
||||
class ShopeeProductProducer extends OrderProducer
|
||||
{
|
||||
protected string $exchange = 'shopee.exchange';
|
||||
protected string|array $routingKey = 'product.shopee';
|
||||
|
||||
protected function buildMessage(array $data): array
|
||||
{
|
||||
$parent_meta = parent::buildMessage($data);
|
||||
$parent_meta['platform'] = 'shopee';
|
||||
$parent_meta['data_type'] = 'product';
|
||||
$parent_meta['meta']['source_system'] = 'shopee_api';
|
||||
|
||||
return $parent_meta;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user