<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Shop\Jobs; use Illuminate\Support\Facades\Log; use ModStart\Core\Job\BaseJob; use ModStart\Core\Util\SerializeUtil; class OrderWorkerJob extends BaseJob { public $id; public function handle() { goto jvxhX; jvxhX: if (empty($this->id)) { throw new \Exception('OrderWorkerJob -> id empty'); } goto lsBL7; YQCEU: $ACKjP = config('shop.orderWorkerNamespace', null); goto jJ7_U; JmBDZ: $n95uW = new $nD4z7(); goto ypJ2a; uAnRX: if (!class_exists($nD4z7)) { throw new \Exception('OrderWorkerJob -> worker not exists -> ' . $nD4z7 . ' -> ' . SerializeUtil::jsonEncode($Fd50E)); } goto JmBDZ; lsBL7: $Fd50E = ModelUtil::get('order_worker', array('id' => $this->id)); goto gvsMK; NIK0T: $n95uW->order = $v9Xk2; goto ng1d_; ng1d_: $n95uW->orderGoods = $jiVEb; goto V3T5c; C6KGf: if ($Fd50E['status'] != OrderWorkerStatus::WAIT_START) { throw new \Exception('OrderWorkerJob -> order worker status error -> ' . SerializeUtil::jsonEncode($Fd50E)); } goto q63Lk; b_ImU: if (empty($jiVEb)) { throw new \Exception('OrderWorkerJob -> order goods empty -> ' . SerializeUtil::jsonEncode($Fd50E)); } goto YQCEU; jJ7_U: $nD4z7 = $ACKjP . '' . $Fd50E['worker']; goto uAnRX; LwUp8: if (empty($v9Xk2)) { throw new \Exception('OrderWorkerJob -> order empty -> ' . SerializeUtil::jsonEncode($Fd50E)); } goto b_ImU; V3T5c: try { goto ZmlMQ; U_j9W: $n95uW->markCompleted(); goto t3hQc; LkGee: $n95uW->run(); goto U_j9W; ZmlMQ: $n95uW->markRunning(); goto LkGee; t3hQc: } catch (\Exception $qoTNG) { Log::error('OrderWorkerJob -> worker error -> ' . SerializeUtil::jsonEncode($n95uW)); $n95uW->markFailed(); } finally { $n95uW->saveLastResult(); } goto DGZAb; gvsMK: if (empty($Fd50E)) { throw new \Exception('OrderWorkerJob -> order worker empty'); } goto C6KGf; mXFYY: $jiVEb = ModelUtil::get('order_goods', array('id' => $Fd50E['orderGoodsId'])); goto LwUp8; q63Lk: $v9Xk2 = ModelUtil::get('order', array('id' => $Fd50E['orderId'])); goto mXFYY; ypJ2a: $n95uW->orderWorker = $Fd50E; goto NIK0T; DGZAb: } }