# 消息服务接口文档V2.0
# 接口定义
# 发送消息
请求方式:POST
请求地址:./glink-msgc/message/send
# 文本消息
请求示例:
{
  "category":"TI_XING",
  "msgType": "text",
  "recipient": {
    "orgIds": [
      "1529706568714043392"
    ],
    "orgNames": [
      "广联达天下集团"
    ],
    "userIds": [
      "1"
    ],
    "userNames": [
      "管理员"
    ]
  },
  "senderId": "1",
  "senderName": "管理员",
  "sourceId": "1541396584678834176",
  "sourceName": "请销假",
  "textContent": {
    "content": "请假申请",
    "noticeMethod": "SYSTEM_MESSAGE",
    "title": "请销假"
  }
}
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
参数说明:
| 参数 | 是否必须 | 说明 | 
|---|---|---|
| category | 是 | 消息分类,来源于字典code | 
| msgType | 是 | 消息类型,固定值,文本消息固定 text | 
| recipient.orgIds | 否 | 接收方组织或岗位id集合 | 
| recipient.orgNames | 否 | 接收方组织或岗位名称集合 | 
| recipient.userIds | 否 | 接收方人员id集合 | 
| recipient.userNames | 否 | 接收方人员名称集合 | 
| senderId | 是 | 发送人id | 
| senderName | 是 | 发送人名称 | 
| sourceId | 是 | 发送方系统id | 
| sourceName | 是 | 发送方系统名称 | 
| textContent.content | 是 | 文本消息内容 | 
| textContent.noticeMethod | 是 | 文本消息通知方式 | 
| textContent.title | 是 | 文本消息标题 | 
返回示例:
{
    "uuid": "6fb45586-67c5-4b09-97a8-7145f2f03e5c",
    "code": "000000",
    "msg": "成功",
    "data": true,
    "ok": true
}
 1
2
3
4
5
6
7
2
3
4
5
6
7
# 模版消息
请求示例:
{
  "category":"TI_XING",
  "msgType": "template",
  "recipient": {
    "orgIds": [
      "1529706568714043392"
    ],
    "orgNames": [
      "广联达天下集团"
    ],
    "userIds": [
      "1"
    ],
    "userNames": [
      "管理员"
    ]
  },
  "senderId": "1",
  "senderName": "管理员",
  "sourceId": "1541396584678834176",
  "sourceName": "请销假",
  "templateContent": {
    "templateCode": "QXJ.qingxiaojia",
    "templateParams": {
        "name": "张三",
        "number": 3
    }
  }
}
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
参数说明:
| 参数 | 是否必须 | 说明 | 
|---|---|---|
| category | 是 | 消息分类,来源于字典code | 
| msgType | 是 | 消息类型,固定值,文本消息固定 template | 
| recipient.orgIds | 否 | 接收方组织或岗位id集合 | 
| recipient.orgNames | 否 | 接收方组织或岗位名称集合 | 
| recipient.userIds | 否 | 接收方人员id集合 | 
| recipient.userNames | 否 | 接收方人员名称集合 | 
| senderId | 是 | 发送人id | 
| senderName | 是 | 发送人名称 | 
| sourceId | 是 | 发送方系统id | 
| sourceName | 是 | 发送方系统名称 | 
| templateContent.templateCode | 是 | 模版消息编码,来源模版定义 | 
| templateContent.templateParams | 是 | 模版内参数传递,以键值对的形式传入 | 
返回示例:
{
    "uuid": "6fb45586-67c5-4b09-97a8-7145f2f03e5c",
    "code": "000000",
    "msg": "成功",
    "data": true,
    "ok": true
}
 1
2
3
4
5
6
7
2
3
4
5
6
7