<?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($lF49t, $H09n_, $JKXDQ) { goto LXVsc; YGDkz: $QJc0N->phone = $lF49t; goto LDpkr; NRA6x: $QJc0N->templateData = $JKXDQ; goto Borsj; LXVsc: $QJc0N = new static(); goto YGDkz; Borsj: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($QJc0N); goto R6i52; LDpkr: $QJc0N->template = $H09n_; goto NRA6x; R6i52: } public function handle() { goto K6iuy; XQD0Z: $sefXk = app()->config->get('SmsSenderProvider'); goto jrYMq; K6iuy: $UeiGJ = $this->phone . ' - ' . $this->template . ' - ' . json_encode($this->templateData, JSON_UNESCAPED_UNICODE); goto ejYxc; jrYMq: try { goto jYJLi; Zjx9z: Logger::info('Sms', 'End', $this->phone . ' - ' . json_encode($Gs3Xd, JSON_UNESCAPED_UNICODE)); goto XvqPP; i5JnS: $Gs3Xd = SmsSenderProvider::get($sefXk)->send($this->phone, $this->template, $this->templateData); goto Ev0Rs; jYJLi: BizException::throwsIfEmpty('短信发送未设置', $sefXk); goto i5JnS; Ev0Rs: BizException::throwsIfResponseError($Gs3Xd); goto Zjx9z; XvqPP: } catch (BizException $hSVcc) { Logger::error('Sms', 'Error', $this->phone . ' - ' . $hSVcc->getMessage()); } goto Z_KNv; ejYxc: Logger::info('Sms', 'Start', $UeiGJ); goto XQD0Z; Z_KNv: } }