|
|
|
@ -0,0 +1,36 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
namespace App\JsonRpc; |
|
|
|
|
|
|
|
|
|
|
|
use App\Service\SmsAliService; |
|
|
|
use Hyperf\RpcServer\Annotation\RpcService; |
|
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
|
|
|
|
|
/** |
|
|
|
* @RpcService(name="AlismsService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="") |
|
|
|
* Class AliSmsService |
|
|
|
* @package App\JsonRpc |
|
|
|
*/ |
|
|
|
class AlismsService implements SmsServiceInterface |
|
|
|
{ |
|
|
|
/** |
|
|
|
* @Inject |
|
|
|
* @var SmsAliService |
|
|
|
*/ |
|
|
|
private $smsAliService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 阿里短信 |
|
|
|
* @param $phone |
|
|
|
* @param $template |
|
|
|
* @param $templateParams |
|
|
|
* @param string $signName |
|
|
|
* @return array|bool |
|
|
|
*/ |
|
|
|
public function sent($phone, $template, $templateParams, $signName = '懒族生活') |
|
|
|
{ |
|
|
|
return $this->smsAliService->send($phone, $template, $templateParams, $signName = '懒族生活'); |
|
|
|
} |
|
|
|
} |