<?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($VaTf5, $Aj5L2, $QmY2j) { goto pSbFQ; pSbFQ: $pJeg8 = new static(); goto Wquc7; Wquc7: $pJeg8->phone = $VaTf5; goto tNPNr; tNPNr: $pJeg8->template = $Aj5L2; goto GVokT; GVokT: $pJeg8->templateData = $QmY2j; goto HwTKV; HwTKV: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($pJeg8); goto BBCYj; BBCYj: } public function handle() { goto O7IKg; d5TIH: $oMd7I = app()->config->get('SmsSenderProvider'); goto tunOp; tunOp: try { goto hbbwS; ddUKX: $Tbn6c = SmsSenderProvider::get($oMd7I)->send($this->phone, $this->template, $this->templateData); goto w88U9; w88U9: BizException::throwsIfResponseError($Tbn6c); goto BwMve; hbbwS: BizException::throwsIfEmpty('短信发送未设置', $oMd7I); goto ddUKX; BwMve: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($Tbn6c, JSON_UNESCAPED_UNICODE)); goto ApAsg; ApAsg: } catch (BizException $ZemkG) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $ZemkG->getMessage()); } goto iQRdm; E3d_E: Logger::info('Sms', 'Start', $hJG81); goto d5TIH; O7IKg: $hJG81 = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto E3d_E; iQRdm: } }