Commit d1a1536c authored by jiangkebao's avatar jiangkebao
Browse files

rpc 消息推送

parent 06b05c1e
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?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;
}
+0 −20
Original line number Diff line number Diff line
<?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;
}
+0 −14
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: 姜克保
 * Date: 2020/5/20
 * Time: 15:48
 */

namespace Meibuyu\Micro\Service\Interfaces;

interface SocketIoServiceInterface
{
	public function sendToUsers($userIdList,$message);
}