Commit d1a1536c authored by jiangkebao's avatar jiangkebao

rpc 消息推送

parent 06b05c1e
<?php
/**
* Created by PhpStorm.
* User: 姜克保
* Date: 2020/5/20
* Time: 15:48
*/
namespace Meibuyu\Micro\Service\Interfaces;
use phpDocumentor\Reflection\Types\Integer;
interface MessageServiceInterface
{
/**
* @param array $receiveUserId 接收人id
* @param string $application 应用名称
* @param int $sendUserId 发送人id(发送人id等于0时是系统消息)
* @param int $templateId 模板id
* @param array $replace 替换模板内容
*/
public function send(array $receiveUserId, $application, $templateId, $sendUserId = 0, $replace = []): bool;
}
<?php
/**
* Created by PhpStorm.
* User: 姜克保
* Date: 2020/5/20
* Time: 15:48
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface MessageTemplateServiceInterface
{
/**
* 返回替换后的模板内容
* @param int $template_id 模板id
* @param array $replace 替换内容(注意顺序)
* @return string
*/
public function getMessage(int $template_id, array $replace = []): string;
}
<?php
/**
* Created by PhpStorm.
* User: 姜克保
* Date: 2020/5/20
* Time: 15:48
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface SocketIoServiceInterface
{
public function sendToUsers($userIdList,$message);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment