初始化仓库
This commit is contained in:
26
common/handlers/ProductOrderPayedHandlerClass.php
Normal file
26
common/handlers/ProductOrderPayedHandlerClass.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace common\handlers;
|
||||
|
||||
use common\jobs\ProductOrderSyncJob;
|
||||
|
||||
class ProductOrderPayedHandlerClass extends BaseProductOrderHandler
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
self::execute();
|
||||
}
|
||||
|
||||
protected function execute()
|
||||
{
|
||||
$this->autoSync();
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function autoSync()
|
||||
{
|
||||
// 订单自动同步任务
|
||||
\Yii::$app->queue->push(new ProductOrderSyncJob([
|
||||
'orderId' => $this->event->order->id,
|
||||
]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user