Commit e75219076d11de7ecc0a46d366d05d53727a9abc

Authored by 张志伟
1 parent 4d8b4fa0

:memo: 编写对接文档

Showing 1 changed file with 49 additions and 5 deletions
README.md
... ... @@ -4,9 +4,53 @@ C端消息中心
4 4 ### 对接文档
5 5 ### 1. SDK
6 6 ```xml
7   - <dependency>
8   - <groupId>cn.fw</groupId>
9   - <artifactId>fw-hestia-sdk</artifactId>
10   - <version>1.0.0</version>
11   -</dependency>
  7 + <dependency>
  8 + <groupId>cn.fw</groupId>
  9 + <artifactId>fw-hestia-sdk</artifactId>
  10 + <version>1.0.0</version>
  11 + </dependency>
12 12 ```
  13 +### 2. 接口
  14 + 1. #### 发送模板消息
  15 + - `IMessageCenterService#send`
  16 + 1. ##### 参数
  17 + |参数名| 必须 |类型|说明|
  18 + |---|:---:|:---:|:---|
  19 + |memberId|是 | Long| 会员id|
  20 + |title| 是 | String| 标题内容。|
  21 + |changeType| 是 | String| 变更类型|
  22 + |changeResult| 是 | String| 变更结果。|
  23 + |remark| 否 | String| 备注。|
  24 + |path| 否 | String| 小程序页面路径。|
  25 + |paramMap| 否 | HashMap<String,String>| 跳转小程序所携带的参数。|
  26 + 2. ##### 返回值
  27 + `sceneToken` 长整型
  28 + 3. ##### 说明
  29 + > 调用接口成功后小程序上已经能看到对应的消息了,公众号模板消息可能会因为各种原因没有发送到微信上去,所以如果需要监听模板消息发送的情况 需要监听MQ消息通过sceneToken通知发送成功的事件
  30 +2. #### 撤回消息
  31 + - `IMessageCenterService#revokeMessage`
  32 + 1. ##### 参数
  33 + |参数名| 必须 |类型|说明|
  34 + |---|:---:|:---:|:---|
  35 + |sceneToken|是 | Long| sceneToken|
  36 + 2. ##### 返回值
  37 + 返回是否操作成功
  38 + 3. ##### 说明
  39 + > 撤回消息。 小程序消息中心无法查看,但是发送出去的公众号模板消息无法回滚
  40 +### 3. MQ
  41 +- #### 说明
  42 + > 成功发送公众号模板消息后会发送mq
  43 +- #### topic: message_send
  44 + ```java
  45 + public class MessageSendMq {
  46 + public final static String TOPIC = "message_send";
  47 + /**
  48 + * 唯一标识
  49 + */
  50 + private Long sceneToken;
  51 + /**
  52 + * 发送时间
  53 + */
  54 + private Date sendTime;
  55 + }
  56 + ```
13 57 \ No newline at end of file
... ...