<?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($lF49t, $H09n_, $JKXDQ) { goto OiyaX; XxU6n: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($QJc0N); goto PMIiJ; yImSD: $QJc0N->template = $H09n_; goto ANXyR; ANXyR: $QJc0N->templateData = $JKXDQ; goto XxU6n; OiyaX: $QJc0N = new static(); goto Y__BY; Y__BY: $QJc0N->phone = $lF49t; goto yImSD; PMIiJ: } public function handle() { goto wE4Eu; dJ79D: Logger::info('Sms', 'Start', $UeiGJ); goto Wsrva; wE4Eu: $UeiGJ = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto dJ79D; Wsrva: $sefXk = app()->config->get('SmsSenderProvider'); goto NQKjE; NQKjE: try { goto hYzjD; hYzjD: BizException::throwsIfEmpty('短信发送未设置', $sefXk); goto gGsK2; gGsK2: $Gs3Xd = SmsSenderProvider::get($sefXk)->send($this->phone, $this->template, $this->templateData); goto uv3RE; uv3RE: BizException::throwsIfResponseError($Gs3Xd); goto siFXO; siFXO: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($Gs3Xd, JSON_UNESCAPED_UNICODE)); goto JNZPJ; JNZPJ: } catch (BizException $hSVcc) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $hSVcc->getMessage()); } goto snPs3; snPs3: } }