<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Job; 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($LBYcD, $jULgk, $DQ0aq) { goto Iki1e; w0K3S: $sEf_e->template = $jULgk; goto lDy_u; zZWOf: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($sEf_e); goto RY0we; moLnC: $sEf_e->phone = $LBYcD; goto w0K3S; lDy_u: $sEf_e->templateData = $DQ0aq; goto zZWOf; Iki1e: $sEf_e = new static(); goto moLnC; RY0we: } public function handle() { goto RF9Mq; dgOAA: try { goto KHbSJ; AqSef: $oHb9_ = SmsSenderProvider::get($tcA2a)->send($this->phone, $this->template, $this->templateData); goto y3MOg; KHbSJ: BizException::throwsIfEmpty('短信发送未设置', $tcA2a); goto AqSef; y3MOg: BizException::throwsIfResponseError($oHb9_); goto q7bLN; q7bLN: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($oHb9_, JSON_UNESCAPED_UNICODE)); goto AWhlR; AWhlR: } catch (BizException $cknMI) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $cknMI->getMessage()); } goto bkjJT; wITHW: $tcA2a = app()->config->get('SmsSenderProvider'); goto dgOAA; DUTtc: Logger::info('Sms', 'Start', $k0xov); goto wITHW; RF9Mq: $k0xov = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto DUTtc; bkjJT: } }