# 用户消息 API 文档 本文档专门描述用户消息管理相关的接口。 ## 1. 基础信息 * **URL 前缀**: `/v2/user/message` * **响应格式**: 统一使用 `GlobalResponseWrapper` --- ## 2. 接口列表 ### 2.1 获取用户消息列表 * **URL**: `/list` * **Method**: `GET` * **描述**: 分页查询用户消息列表。 #### 请求参数 | 字段名 | 类型 | 必填 | 说明 | | :--- | :--- | :--- | :--- | | `page` | integer | 否 | 页码,默认 1 | | `size` | integer | 否 | 每页大小,默认 10 | | `userId` | integer | 否 | 精确筛选用户ID | | `orderId` | string | 否 | 精确筛选订单ID | | `albumId` | integer | 否 | 精确筛选相册ID | | `startTime` | string | 否 | 开始时间 (yyyy-MM-dd HH:mm:ss) | | `endTime` | string | 否 | 结束时间 (yyyy-MM-dd HH:mm:ss) | #### 响应参数 (`data` 字段) 返回 Mybatis-Plus `Page` 对象,`records` 列表中的元素结构如下: | 字段名 | 类型 | 说明 | | :--- | :--- | :--- | | `id` | integer | 消息ID | | `userId` | integer | 用户ID | | `title` | string | 消息标题 | | `content` | string | 消息内容 | | `thumbUrl` | string | 缩略图 | | `type` | integer | 消息类型 (0:订单已支付 1:训练分身 2:训练分身完成 3:训练写真 4:训练写真完成) | | `orderId` | string | 订单ID | | `albumId` | integer | 相册ID | | `createTime` | string | 创建时间 | | `updateTime` | string | 最后更新时间 | | `readStatus` | integer | 已读状态 (0:未读 1:已读) | | `nickname` | string | **用户昵称** | | `email` | string | **用户邮箱** | | `appleUserId` | string | **苹果ID** | | `originalTransactionId` | string | **原始交易ID** | | `platform` | string | **用户平台** | | `language` | string | **用户语言** | #### 示例响应 ```json { "code": 200, "message": "success", "data": { "records": [ { "id": 501, "userId": 10086, "title": "系统通知", "content": "您的分身训练已完成...", "thumbUrl": "https://example.com/thumb.jpg", "type": 2, "orderId": "20231027001", "albumId": 101, "createTime": "2023-10-27 10:00:00", "updateTime": "2023-10-27 10:00:00", "readStatus": 0, "nickname": "测试用户A", "email": "test@example.com", "appleUserId": "000000.89347589237589.0000", "originalTransactionId": "200000000000000", "platform": "IOS", "language": "zh-CN" } ], "total": 1, "size": 10, "current": 1 } } ```