<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Sms; use ModStart\Core\Exception\BizException; use ModStart\Core\Job\BaseJob; 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($cz6lT, $XPQ0m, $YxsLg) { goto Gy_jV; X6o9v: $n_tN1->templateData = $YxsLg; goto q4mxk; bVJgi: $n_tN1->phone = $cz6lT; goto PNM7Z; Gy_jV: $n_tN1 = new static(); goto bVJgi; PNM7Z: $n_tN1->template = $XPQ0m; goto X6o9v; q4mxk: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($n_tN1); goto aj_ia; aj_ia: } public function handle() { goto yv1C3; fzKho: try { goto Eyz8u; Q1gIj: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($Ecj99, JSON_UNESCAPED_UNICODE)); goto ypUui; qSTkl: $Ecj99 = SmsSenderProvider::get($O9Vtg)->send($this->phone, $this->template, $this->templateData); goto hmQHf; hmQHf: BizException::throwsIfResponseError($Ecj99); goto Q1gIj; Eyz8u: BizException::throwsIfEmpty('短信发送未设置', $O9Vtg); goto qSTkl; ypUui: } catch (BizException $fWY9h) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $fWY9h->getMessage()); } goto SmgBt; lqGwH: Logger::info('Sms', 'Start', $x0Ets); goto pqOuR; yv1C3: $x0Ets = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto lqGwH; pqOuR: $O9Vtg = app()->config->get('SmsSenderProvider'); goto fzKho; SmgBt: } }