feat : statement
This commit is contained in:
24
app/Amqp/Producer/Statement/ChefProducer.php
Normal file
24
app/Amqp/Producer/Statement/ChefProducer.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Amqp\Producer\Statement;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use Hyperf\Amqp\Message\ProducerMessage;
|
||||
use Hyperf\Amqp\Message\Type;
|
||||
|
||||
#[Producer(exchange: 'hyperf', routingKey: 'hyperf')]
|
||||
class ChefProducer extends ProducerMessage
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Type|string 消息类型
|
||||
*/
|
||||
protected Type|string $type = Type::DIRECT;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->payload = $data;
|
||||
}
|
||||
}
|
||||
24
app/Amqp/Producer/Statement/DriverProducer.php
Normal file
24
app/Amqp/Producer/Statement/DriverProducer.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Amqp\Producer\Statement;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use Hyperf\Amqp\Message\ProducerMessage;
|
||||
use Hyperf\Amqp\Message\Type;
|
||||
|
||||
#[Producer(exchange: 'hyperf', routingKey: 'hyperf')]
|
||||
class DriverProducer extends ProducerMessage
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Type|string 消息类型
|
||||
*/
|
||||
protected Type|string $type = Type::DIRECT;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->payload = $data;
|
||||
}
|
||||
}
|
||||
27
app/Amqp/Producer/Statement/FinancesProducer.php
Normal file
27
app/Amqp/Producer/Statement/FinancesProducer.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Amqp\Producer\Statement;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use Hyperf\Amqp\Message\ProducerMessage;
|
||||
use Hyperf\Amqp\Message\Type;
|
||||
|
||||
#[Producer(exchange: 'Finances', routingKey: 'Finances')]
|
||||
class FinancesProducer extends ProducerMessage
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Type|string 消息类型
|
||||
*/
|
||||
protected Type|string $type = Type::DIRECT;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
/**
|
||||
* $data string array => {"kitchen_id":"kitchen_id","cycle_id":"cycle_id"}
|
||||
*/
|
||||
$this->payload = $data;
|
||||
}
|
||||
}
|
||||
24
app/Amqp/Producer/Statement/SiteProducer.php
Normal file
24
app/Amqp/Producer/Statement/SiteProducer.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Amqp\Producer\Statement;
|
||||
|
||||
use Hyperf\Amqp\Annotation\Producer;
|
||||
use Hyperf\Amqp\Message\ProducerMessage;
|
||||
use Hyperf\Amqp\Message\Type;
|
||||
|
||||
#[Producer(exchange: 'hyperf', routingKey: 'hyperf')]
|
||||
class SiteProducer extends ProducerMessage
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Type|string 消息类型
|
||||
*/
|
||||
protected Type|string $type = Type::DIRECT;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->payload = $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user