<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Faka\Job; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Job\BaseJob; use Module\Faka\Type\ProductOrderProcessStatus; use Module\Vendor\Job\MailSendJob; class ProductOrderProcessorResendJob extends BaseJob { public $processorId = 0; public static function create($fwbR5) { goto NZMjh; OAKTG: $QJc0N->processorId = $fwbR5; goto aJ4Kc; aJ4Kc: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($QJc0N); goto EZpGK; NZMjh: $QJc0N = new static(); goto OAKTG; EZpGK: } public function handle() { goto rEtJ9; xt2Zb: $Wmda_ = ModelUtil::get('faka_product', $MZHZc['productId']); goto fgwyO; Rhq25: $jGqlN = ModelUtil::getWithLock('faka_product_order_processor', $this->processorId); goto y03Pe; fgwyO: $MDFmY = ModelUtil::model('faka_product_stock')->where(array('orderId' => $MZHZc['id']))->get()->toArray(); goto zUJjV; uVaOL: ModelUtil::transactionCommit(); goto o_OvU; zUJjV: MailSendJob::create($MZHZc['email'], '发卡通知', 'fakaNotice', array('stocks' => $MDFmY, 'product' => $Wmda_), null, array(), 0, 'Faka'); goto AWG3v; rEtJ9: ModelUtil::transactionBegin(); goto Rhq25; y03Pe: if (empty($jGqlN)) { ModelUtil::transactionCommit(); return; } goto WrYfL; WrYfL: if ($jGqlN['processStatus'] != ProductOrderProcessStatus::PROCESSED) { ModelUtil::transactionCommit(); return; } goto uVaOL; o_OvU: $MZHZc = ModelUtil::get('faka_product_order', $jGqlN['orderId']); goto xt2Zb; AWG3v: } }