<?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($LBYcD, $jULgk, $DQ0aq) { goto nueA3; nueA3: $sEf_e = new static(); goto GSAHZ; YfV1P: $sEf_e->templateData = $DQ0aq; goto yNaL0; UDB4D: $sEf_e->template = $jULgk; goto YfV1P; GSAHZ: $sEf_e->phone = $LBYcD; goto UDB4D; yNaL0: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($sEf_e); goto x4RKA; x4RKA: } public function handle() { goto TkiS3; oJ84M: $tcA2a = app()->config->get('SmsSenderProvider'); goto R36SZ; zHd4w: Logger::info('Sms', 'Start', $k0xov); goto oJ84M; TkiS3: $k0xov = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto zHd4w; R36SZ: try { goto LkPr3; Xg0no: $oHb9_ = SmsSenderProvider::get($tcA2a)->send($this->phone, $this->template, $this->templateData); goto hGVae; LkPr3: BizException::throwsIfEmpty('短信发送未设置', $tcA2a); goto Xg0no; BzV00: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($oHb9_, JSON_UNESCAPED_UNICODE)); goto REUfT; hGVae: BizException::throwsIfResponseError($oHb9_); goto BzV00; REUfT: } catch (BizException $cknMI) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $cknMI->getMessage()); } goto foOQm; foOQm: } }