Commit c86feced authored by jiangkebao's avatar jiangkebao

钉钉消息

parent 461a6260
<?php
/**
* Created by PhpStorm.
* User: 姜克保
* Date: 2020/5/20
* Time: 15:48
*/
namespace Meibuyu\Micro\Service\Interfaces\DingTalk;
interface DingAuthServiceInterface
{
/**
* 通过临时授权码获取用户信息
* @param string $code 临时授权码
* @return array
*/
public function getDingUserByTempCode($code): array;
}
......@@ -8,7 +8,36 @@
namespace Meibuyu\Micro\Service\Interfaces\DingTalk;
use phpDocumentor\Reflection\Types\Mixed_;
interface DingMessageServiceInterface
{
/**
* 发送普通消息
*
* @param string $sender 消息发送者 userId
* @param string $cid 群会话或者个人会话的id,通过JSAPI接口唤起联系人界面选择会话获取会话cid;小程序参考获取会话信息,H5微应用参考获取会话信息
* @param array $message 消息内容,消息类型和样例可参考“消息类型与数据格式”文档。最长不超过2048个字节
*
* @return mixed
*/
public function sendGeneralMessage($sender, $cid, $message);
/**
* 发送工作通知消息
*
* @param array $params
*
* @return mixed
*/
public function sendCorporationMessage($params);
/**
* @param int $taskId
*
* @return mixed
*/
public function corporationMessage($taskId);
}
......@@ -16,22 +16,22 @@ interface DingUserServiceInterface
*/
public function getByDingUserId($ding_user_id): array;
/**
* 通过部门id获取部门分页用户列表
* @param int $departmentId 部门id
* @param string $departmentId 部门id
* @param int $offset
* @param int $size
* @param string|null $order
* @param string|null $lang
* @return array
*/
public function getDepartmentUsers(int $departmentId, int $offset, int $size, string $order = null, string $lang = null): array;
public function getDepartmentUsers(string $departmentId, int $offset, int $size, string $order = null, string $lang = null): array;
/**
* 通过Unionid获取用户id
* @param int $unionid unionid
* @return int
* 通过临时授权码获取用户信息
* @param string $code 临时授权码
* @return array
*/
public function getUseridByUnionid(int $unionid): int;
public function getDingUserByTempCode($code): array;
}
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