https://cic_irc.yuque.com/tyl581/ggwv9w/nqxrpiuyh1d4ygyb
一、pom坐标
<dependency>
<groupId>com.aliyun.fsi.insurance</groupId>
<artifactId>basic-facade</artifactId>
<version>1.1.10-SNAPSHOT</version>
</dependency>
二、接口列表
2.1.发送站内信消息-依赖消息模板
URL: /platform/api/aboss/basic/send-message-with-template
Type: POST
Author: cgp
Content-Type: application/json; charset=utf-8
Description: com.aliyun.fsi.insurance.basic.facade.MessageSendFacade#sendMessage(com.aliyun.fsi.insurance.basic.repository.dataobject.MessageSendRecordReqDTO)
Body-parameters:
| Parameter | Type | Description | Required | Since |
| templateId | string | 模板ID | true | - |
| paramContent | map | 消息参数集合 | false | - |
| msgNo | string | 消息流水号 | false | - |
| url | string | 消息跳转链接(没有值以模板配置url为准,有值就以传递的为准) | false | - |
| messageAudienceResponseDTOS | array | 接受人集合 | true | - |
| └─accepterId | string | 接受者id | true | - |
| └─accepterType | string | 接受者类型(02-个人,05-机构,06-角色),不允许传递多个不同的接收者类型 | true | - |
Request-example:
curl -X GET -H 'Content-Type: application/json; charset=utf-8' -i /platform/api/aboss/basic/send-message-with-template --data '{
"templateId": "22",
"paramContent": {
"mapKey": "dq2cc4"
},
"msgNo": "jr07k9",
"url": "www.liana-sanford.info",
"messageAudienceResponseDTOS": [
{
"accepterId": "22",
"accepterType": "m8k8e2"
}
]
}'
Response-example:
string
2.2.发送站内信消息-不依赖消息模板
URL: /platform/api/aboss/basic/send-message
Type: POST
Author: cgp
Content-Type: application/json; charset=utf-8
Description: com.aliyun.fsi.insurance.basic.facade.InternalMessageRpcFacade#sendMessage(com.aliyun.fsi.insurance.basic.data.cmd.SendInternalMessageCmd)
Body-parameters:
| Parameter | Type | Description | Required | Since |
| appId | string | 应用编码 | true | - |
| requestNo | string | 请求流水号 | true | - |
| msgType | string | 消息类型 | true | - |
| msgTitle | string | 消息标题 | true | - |
| msgBody | string | 消息内容 | true | - |
| url | string | 消息跳转链接 | false | - |
| receiverIds | array | 消息接受者集合 | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /platform/api/aboss/basic/send-message --data '{
"appId": "149",
"requestNo": "99qttb",
"msgType": "kpnomh",
"msgTitle": "etu6pl",
"msgBody": "amtk8u",
"url": "www.candelaria-johnston.co",
"receiverIds": [
"8cde5o"
]
}'
Response-example:
string
2.3.根据参数分页查询站内信消息集合(最多返回100条记录)
URL: /platform/api/aboss/basic/query-msg-list
Type: POST
Author: cgp
Content-Type: application/json; charset=utf-8
Description: com.aliyun.fsi.insurance.basic.facade.InternalMessageRpcFacade#queryMsgList(com.aliyun.fsi.insurance.basic.data.InternalMessageQry)
Body-parameters:
| Parameter | Type | Description | Required | Since |
| pageSize | int32 | 每页展示条数 | true | - |
| pageIndex | int32 | 当前页码 | true | - |
| appId | string | 应用编码 | false | - |
| collect | int8 | 是否收藏(0-否,1-是) | false | - |
| read | int8 | 是否已读(0-否,1-是) | false | - |
| keyword | string | 搜索关键字 | false | - |
| accId | string | 账户id | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /platform/api/aboss/basic/query-msg-list --data '{
"pageSize": 10,
"pageIndex": 1,
"appId": "149",
"collect": 92,
"read": 86,
"keyword": "4gut3k",
"accId": "149"
}'
Response-fields:
| Field | Type | Description | Since |
| data | array | 返回结果 | - |
| └─msgId | string | 消息主键 | - |
| └─appId | string | 应用编码 | - |
| └─appName | string | 应用名称 | - |
| └─msgType | string | 消息类型(TEXT-文本,LINK-链接) | - |
| └─msgTitle | string | 消息标题 | - |
| └─msgBody | string | 消息内容 | - |
| └─url | string | 消息跳转链接 | - |
| └─sendDate | string | 消息发送时间 | - |
| └─collected | int8 | 是否收藏(0-否,1-是) | - |
| └─read | int8 | 是否已读(0-否,1-是) | - |
| pageIndex | int32 | 页码 | - |
| totalCount | int32 | 总数 | |
| - | |||
| pageSize | int32 | 分页数 | - |
| status | int32 | 状态 | - |
| message | object | 消息 | - |
| └─code | string | 返回结果码 | - |
| └─message | string | 返回结果信息 | - |
| └─errorContext | object | 返回错误明细 | - |
| └─errorStack | array | 错误堆栈集合 | - |
| └─version | string | 结果码版本 | - |
| └─codeLevel | string | 结果码级别[第9位],INFO-1,WARN-3,ERROR-5,FATAL-7,参见ResultCodeLevel定义 | - |
| └─codeType | string | 结果码类型[第10位],SUCCESS-0,BIZ_ERROR-1,SYS_ERROR-2,THIRD_ERROR-3,参见ResultCodeType定义 | - |
| └─systemCode | string | 系统编号[第11-13位],见SystemCode定义 | - |
| └─systemName | string | 系统名称 | - |
| └─errorSpecific | string | 具体结果码[第14-17位] | - |
| └─errorName | string | 错误英文简称 | - |
| └─description | string | 结果码信息描述,可空 | - |
| └─thirdPartyError | string | 第三方错误原始信息 | - |
| └─errorVariableMap | map | 错误变量映射 | - |
| needRetry | boolean | 是否可以重试 false代表不能重试,true可选择重试,也可选择不再重试 | - |
| extendInfo | map | 扩展信息 | - |
Response-example:
{
"data": [
{
"msgId": "149",
"appId": "149",
"appName": "blair.kohler",
"msgType": "zw7y9v",
"msgTitle": "6jemq3",
"msgBody": "uj1tf1",
"url": "www.candelaria-johnston.co",
"sendDate": "2023-10-18",
"collected": 99,
"read": 104
}
],
"pageIndex": 1,
"totalCount": 774,
"pageSize": 10,
"status": 873,
"message": {
"code": "81552",
"message": "success",
"errorContext": {
"errorStack": [
{
"version": "8.5.6",
"codeLevel": "kvxm72",
"codeType": "9kxzbk",
"systemCode": "81552",
"systemName": "blair.kohler",
"errorSpecific": "tdr447",
"errorName": "blair.kohler",
"description": "5d59fd"
}
],
"thirdPartyError": "urw97m",
"errorVariableMap": {
"mapKey": "e6n1do"
}
}
},
"needRetry": true,
"extendInfo": {
"mapKey": "n567bx"
}
}
2.4.根据(已读/收藏)统计站内信息,并按照归属域分组
URL: /platform/api/aboss/basic/query-msg-count-group-by-app
Type: POST
Author: cgp
Content-Type: application/json; charset=utf-8
Description: 根据(已读未读/收藏取消收藏)查询未读消息统计信息,并按照归属域分组
Body-parameters:
| Parameter | Type | Description | Required | Since |
| collect | int8 | 是否收藏(0-否,1-是) | false | - |
| read | int8 | 是否已读(0-否,1-是) | false | - |
| accId | string | 账户id | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /platform/api/aboss/basic/query-msg-count-group-by-app --data '{
"collect": 42,
"read": 49,
"accId": "149"
}'
Response-fields:
| Field | Type | Description | Since |
| appId | string | 消息来源(应用id) | - |
| appName | string | 消息来源名称(应用名) | - |
| undoneCount | int32 | 未读总数 | - |
| doneCount | int32 | 已读总数 | - |
Response-example:
[
{
"appId": "149",
"appName": "blair.kohler",
"undoneCount": 754,
"doneCount": 543
}
]
2.5.批量标识已读站内信消息
URL: /platform/api/aboss/basic/read-msg
Type: POST
Author: cgp
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: com.aliyun.fsi.insurance.basic.facade.InternalMessageRpcFacade#readMsg(com.aliyun.fsi.insurance.basic.data.cmd.ReadInternalMessageCmd)
Query-parameters:
| Parameter | Type | Description | Required | Since |
| msgIds | array | 站内信id集合 | true | - |
| accId | string | 账户id | true | - |
Request-example:
curl -X POST -i /platform/api/aboss/basic/read-msg
Response-example:
true
2.6.收藏/取消收藏站内信消息
URL: /platform/api/aboss/basic/collect-msg
Type: POST
Author: cg
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: com.aliyun.fsi.insurance.basic.facade.InternalMessageRpcFacade#collectMsg(com.aliyun.fsi.insurance.basic.data.cmd.CollectInternalMessageCmd)
Query-parameters:
| Parameter | Type | Description | Required | Since |
| msgId | string | 站内信id | true | - |
| collect | int8 | 是否收藏(0-否,1-是) | true | - |
| accId | string | 账户id | true | - |
Request-example:
curl -X POST -i /platform/api/aboss/basic/collect-msg --data 'collect=19&msgId=149'
Response-example:
true
2.7 通过appid 批量标识已读站内信消息
URL: /platform/api/aboss/basic/read-msg-by-appid
Type: POST
Author: zhanghua
Content-Type: application/json; charset=utf-8
Description: 通过appid 批量标识已读站内信消息
* @apiNote com.aliyun.fsi.insurance.basic.facade.InternalMessageRpcFacade#readMsgByAppId(com.aliyun.fsi.insurance.basic.data.cmd.readInternalMessageByAppIdCmd)
Body-parameters:
| Parameter | Type | Description | Required | Since |
| appId | string | 站内信id集合 | true | - |
| accId | string | 当前账户id(RPC接口必传) | false | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /platform/api/aboss/basic/read-msg-by-appid --data '{
"appId": "99",
"accId": "99"
}'
Response-example:
true
三、附录
2.2-2.6有权限控制,需填写如下申请单
| 访问方法 | 请求来源 | 备注 |
| com.aliyun.fsi.insurance.sso.impl.AccountRpcFacadeImpl#accountListByKeyword | aboss-sso | rpc请求填写的是应用名 |
| com.aliyun.fsi.insurance.sso.impl.AccountRpcFacadeImpl#accountListByKeyword | /support/basicData/association/query | http请求填写的是referer |