This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Amqp\Producer;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use Hyperf\Amqp\Message\ProducerMessage;
|
||||
|
||||
/**
|
||||
* IM 多媒体文件异步下载并上传 OSS
|
||||
*/
|
||||
#[Producer(exchange: 'amqp.direct', routingKey: 'UploadImMedia')]
|
||||
class UploadImMediaProducer extends ProducerMessage
|
||||
{
|
||||
/**
|
||||
* @param array $data
|
||||
* [
|
||||
* "message_key" => "消息唯一ID",
|
||||
* "msg_type" => "消息类型",
|
||||
* "msg_content" => "消息具体内容(数组)"
|
||||
* ]
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->payload = $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user