<?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($ffJmI, $np9vN, $DlEFb) { goto jUo3t; gfWsw: $bicx_->templateData = $DlEFb; goto qNsFB; qNsFB: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($bicx_); goto nCFGD; zILvZ: $bicx_->template = $np9vN; goto gfWsw; jUo3t: $bicx_ = new static(); goto Qvno9; Qvno9: $bicx_->phone = $ffJmI; goto zILvZ; nCFGD: } public function handle() { goto gOj_r; EVgC6: $kHDkQ = app()->config->get('SmsSenderProvider'); goto J8SHw; JHl_f: Logger::info('Sms', 'Start', $aUqbq); goto EVgC6; J8SHw: try { goto G4nwC; G4nwC: BizException::throwsIfEmpty('短信发送未设置', $kHDkQ); goto NtgUK; CRdMb: BizException::throwsIfResponseError($ZrjxR); goto k4Wtl; k4Wtl: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($ZrjxR, JSON_UNESCAPED_UNICODE)); goto RzbxX; NtgUK: $ZrjxR = SmsSenderProvider::get($kHDkQ)->send($this->phone, $this->template, $this->templateData); goto CRdMb; RzbxX: } catch (BizException $RWZxh) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $RWZxh->getMessage()); } goto knZ8K; gOj_r: $aUqbq = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto JHl_f; knZ8K: } }