hospital-applets-api/app/Amqp/Producer/SendSmsMessageProducer.php
2023-03-27 15:00:53 +08:00

33 lines
720 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace App\Amqp\Producer;
use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerMessage;
/**
* 短信推送
*/
#[Producer(exchange: 'amqp.direct', routingKey: 'SendSmsMessage')]
class SendSmsMessageProducer extends ProducerMessage
{
/**
* @param $data
* [
* "template_code" => "SMS_123",
* "template_param" => [
* // 参数不确定,主要看短信模版的不同
* ],
* "scene_desc" => "场景描述",
* "phone" => "手机号",
* "user_id" => "用户id被推送者"
* ]
*/
public function __construct($data)
{
$this->payload = $data;
}
}