新增了处理优惠卷过期队列和command

This commit is contained in:
2024-06-07 17:32:46 +08:00
parent 7a793a61e7
commit 6569cf21a2
6 changed files with 257 additions and 6 deletions
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Amqp\Producer;
use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerDelayedMessageTrait;
use Hyperf\Amqp\Message\ProducerMessage;
use Hyperf\Amqp\Message\Type;
#[Producer]
class CouponExpiredDelayDirectProducer extends ProducerMessage
{
use ProducerDelayedMessageTrait;
protected string $exchange = 'amqp.delay.direct';
protected string $type = Type::DIRECT;
protected string|array $routingKey = 'CouponExpired';
public function __construct($data)
{
$this->payload = $data;
}
}