<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Shop\Jobs; use Illuminate\Support\Facades\Log; use ModStart\Core\Job\BaseJob; use ModStart\Core\Util\SerializeUtil; use Module\Vendor\Type\OrderStatus; class OrderExpireCheckJob extends BaseJob { public $orderId; public $param; public static function create($E24Va, $w6bW5 = array(), $fr4BE = 0) { goto DIsvV; DIsvV: $owZYb = new OrderExpireCheckJob(); goto dXhlI; uFWON: if ($fr4BE > 0) { $owZYb->delay($fr4BE); } goto GdA3o; uM7sG: $owZYb->param = $w6bW5; goto uFWON; dXhlI: $owZYb->orderId = $E24Va; goto uM7sG; GdA3o: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($owZYb); goto R64EW; R64EW: } public function handle() { goto yBrlh; HbDSd: ModelUtil::transactionBegin(); goto N09Qs; N09Qs: $v9Xk2 = ModelUtil::getWithLock('order', array('id' => $this->orderId)); goto f0bqU; NfexA: ModelUtil::transactionCommit(); goto r0bai; yBrlh: Log::info('Shop.OrderExpireCheckJob.' . sprintf('%05d', getmypid()) . '.Execute ->' . $this->orderId . ' -> ' . SerializeUtil::jsonEncode($this->param)); goto HbDSd; xDjGq: if ($v9Xk2['status'] != OrderStatus::WAIT_PAY) { ModelUtil::transactionCommit(); return; } goto cHnQt; cHnQt: OrderCancelJob::create($this->orderId, array('expire' => true)); goto NfexA; f0bqU: if (empty($v9Xk2)) { ModelUtil::transactionCommit(); return; } goto xDjGq; r0bai: } }