修改自动审核处方为延迟队列

This commit is contained in:
2023-04-21 14:41:08 +08:00
parent 4c64abc47c
commit 989c4d1eab
3 changed files with 44 additions and 27 deletions
@@ -0,0 +1,34 @@
<?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 AutoPharmacistCaVerifyDelayDirectProducer extends ProducerMessage
{
use ProducerDelayedMessageTrait;
protected string $exchange = 'amqp.delay.direct';
protected string $type = Type::DIRECT;
protected string|array $routingKey = 'AutoPharmacistCaVerify';
/**
* @param $data
* [
* prescription_file_id:订单-处方表-ca处方文件主键
* order_prescription_id:订单-处方id
* ]
*/
public function __construct($data)
{
$this->payload = $data;
}
}