<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Sms; use ModStart\Core\Exception\BizException; use ModStart\Core\Job\BaseJob; use ModStart\Core\Util\SerializeUtil; use Module\Vendor\Log\Logger; use Module\Vendor\Provider\SmsSender\SmsSenderProvider; class SmsSendJob extends BaseJob { public $phone; public $template; public $templateData; public static function create($I2nM5, $oqfDC, $nwAwA) { goto YlwS9; iB58a: $owZYb->phone = $I2nM5; goto CPaOn; AjPPB: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($owZYb); goto RedeP; YlwS9: $owZYb = new static(); goto iB58a; kih8d: $owZYb->templateData = $nwAwA; goto AjPPB; CPaOn: $owZYb->template = $oqfDC; goto kih8d; RedeP: } public function handle() { goto EsaAD; VAZh5: $tDnAb = app()->config->get('SmsSenderProvider'); goto cd732; cd732: try { goto DXrRo; DXrRo: BizException::throwsIfEmpty('短信发送未设置', $tDnAb); goto JtVJj; gEbN_: BizException::throwsIfResponseError($rhLXE); goto hYoQp; hYoQp: Logger::info('Sms', 'End', $this->phone . ' - ' . SerializeUtil::jsonEncode($rhLXE, JSON_UNESCAPED_UNICODE)); goto TGu0W; JtVJj: $rhLXE = SmsSenderProvider::get($tDnAb)->send($this->phone, $this->template, $this->templateData); goto gEbN_; TGu0W: } catch (BizException $qoTNG) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $qoTNG->getMessage()); } goto SBZ3l; EsaAD: $sUfYJ = $this->phone . ' - ' . $this->template . ' - ' . SerializeUtil::jsonEncode($this->templateData, JSON_UNESCAPED_UNICODE); goto h_74s; h_74s: Logger::info('Sms', 'Start', $sUfYJ); goto VAZh5; SBZ3l: } }