消息中心接口


获取消息列表

URL: GET /notification/list?page=1

Query:

字段 必填 说明
page 页码,从1开始
size 每页大小
search 搜索关键词
notification_type 消息类型,1系统消息,2推广消息
status 消息状态, SENT已发送, REVOKED已撤回
position 消息位置, POPUP弹窗, CENTER消息中心
send_start 发送开始日期, 2025-05-02
send_end 发送结束日期, 2025-05-12

输出: list<Notification>

Notification

字段 类型 说明
id string 消息id
title string 标题
content string 内容
notification_type number 消息类型,1系统消息,2推广消息
position string 消息位置, POPUP弹窗, CENTER消息中心
status bool 消息状态, SENT已发送, REVOKED已撤回
send_to_all bool 是否发送给所有人
send_to list<string> 发送对象用户id列表
sended_at string 发送时间

新增消息

URL: POST /notification/create

输入:

字段 类型 必填 说明
title string 标题
content string 内容
notification_type number 消息类型,1系统消息,2推广消息
position string 消息位置, POPUP弹窗, CENTER消息中心
send_to_all bool 是否发送给所有人, 确保send_to_all为true或send_to不为空
send_to list<string> 发送对象用户id列表, 确保send_to_all为true或send_to不为空

输出:

字段 类型 说明
id string id

更新消息

URL: POST /notification/{notification_id}/update

输入:

字段 类型 必填 说明
title string 标题
content string 内容
notification_type number 消息类型,1系统消息,2推广消息
position string 消息位置, POPUP弹窗, CENTER消息中心
send_to_all bool 是否发送给所有人, 确保send_to_all为true或send_to不为空
send_to list<string> 发送对象用户id列表, 确保send_to_all为true或send_to不为空

输出:


修改消息状态

URL: POST /notification/{notification_id}/change_status

输入:

字段 类型 必填 说明
status bool 消息状态, SENT已发送, REVOKED已撤回

输出:


删除消息

URL: POST /notification/deletes

输入:

字段 类型 必填 说明
ids list<string> 消息id列表

输出: