You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
822 B
34 lines
822 B
<?php
|
|
|
|
namespace App\JsonRpc;
|
|
|
|
use App\Service\v3\Interfaces\SmsSendServiceInterface;
|
|
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 SmsSendServiceInterface
|
|
*/
|
|
private $smsAliSendService;
|
|
|
|
/**
|
|
* 阿里短信
|
|
* @param $phone
|
|
* @param $template
|
|
* @param $templateParams
|
|
* @param string $signName
|
|
* @return array|bool
|
|
*/
|
|
public function sent($phone, $template, $templateParams, $signName = '懒族生活')
|
|
{
|
|
return $this->smsAliSendService->do($phone, $template, $templateParams);
|
|
}
|
|
}
|