feat : auto dispense coupon

This commit is contained in:
2025-03-19 16:25:54 +08:00
parent f4d681a23a
commit 44170132e7
10 changed files with 331 additions and 59 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Amqp\Producer;
use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerMessage;
use Hyperf\Amqp\Message\Type;
#[Producer(exchange: 'wxSubMessage', routingKey: 'wxSubMessage')]
class WxSubMessageProducer extends ProducerMessage
{
/**
* @var Type|string 消息类型
*/
protected Type|string $type = Type::DIRECT;
public function __construct($data)
{
/**
* $data string array => {"type":"1","user_id":"1","data":[],"page":null}
*/
$this->payload = $data;
}
}