修改延迟队列时间
This commit is contained in:
parent
83a429717b
commit
c7496d01e8
41
app/Command/getPrescriptionOrderStatusCommand.php
Normal file
41
app/Command/getPrescriptionOrderStatusCommand.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use Hyperf\Command\Command as HyperfCommand;
|
||||
use Hyperf\Command\Annotation\Command;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
/**
|
||||
* 获取处方平台订单状态
|
||||
*/
|
||||
#[Command]
|
||||
class getPrescriptionOrderStatusCommand extends HyperfCommand
|
||||
{
|
||||
public function __construct(protected ContainerInterface $container)
|
||||
{
|
||||
parent::__construct('getPrescriptionOrderStatus:command');
|
||||
}
|
||||
|
||||
public function configure()
|
||||
{
|
||||
parent::configure();
|
||||
$this->setDescription('获取处方平台订单状态');
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$this->line("获取处方平台订单状态开始");
|
||||
|
||||
try {
|
||||
// 获取需执行订单数据
|
||||
$params = array();
|
||||
$params['order_product_status'] = "";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$this->line("获取处方平台订单状态失败:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -269,7 +269,7 @@ class InquiryService extends BaseService
|
||||
$data['order_type'] = 1;
|
||||
|
||||
$message = new CancelUnpayOrdersDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * 60 * 30);
|
||||
$message->setDelayMs(1000 * 60 * 5);
|
||||
$producer = $this->container->get(Producer::class);
|
||||
$res = $producer->produce($message);
|
||||
if (!$res) {
|
||||
@ -282,7 +282,7 @@ class InquiryService extends BaseService
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$message = new CancelUnInquiryOrdersDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * 60 * 60 * 24);
|
||||
$message->setDelayMs(1000 * 60 * 5);
|
||||
$producer = $this->container->get(Producer::class);
|
||||
$res = $producer->produce($message);
|
||||
if (!$res) {
|
||||
|
||||
@ -256,7 +256,7 @@ class UserPharmacistService extends BaseService
|
||||
$data['order_prescription_id'] = (string)$order_prescription['order_prescription_id'];
|
||||
|
||||
$message = new PrescriptionExpiredDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * 60 * 60 * 24 * 3);
|
||||
$message->setDelayMs(1000 * 60 * 10);
|
||||
$producer = $this->container->get(Producer::class);
|
||||
$res = $producer->produce($message);
|
||||
if (!$res) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user