本文档描述了用户兑换记录相关的接口规范。
/v2/user/redemption/record/listGET| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
page |
integer | 否 | 页码,默认 1 |
size |
integer | 否 | 每页大小,默认 10 |
userId |
long | 否 | 用户ID |
redemptionCode |
string | 否 | 兑换码(支持模糊搜索) |
startTime |
string | 否 | 开始时间 (yyyy-MM-dd HH:mm:ss) |
endTime |
string | 否 | 结束时间 (yyyy-MM-dd HH:mm:ss) |
data 字段)返回 Mybatis-Plus Page 对象,包含 records (记录列表), total (总数), size (页大小), current (当前页) 等。
records 中的对象 (UserRedemptionRecordVO) 结构如下:
| 字段名 | 类型 | 说明 |
|---|---|---|
id |
long | 记录ID |
userId |
long | 用户ID |
redemptionId |
long | 兑换码ID |
redemptionCode |
string | 兑换码 |
points |
long | 获得点数 |
expireTime |
string | 积分失效时间 |
createTime |
string | 兑换时间 |
nickname |
string | 用户昵称 |
email |
string | 用户邮箱 |
appleUserId |
string | 苹果用户ID |
originalTransactionId |
string | 原始交易ID |
platform |
string | 平台 |
language |
string | 语言 |
GET /v2/user/redemption/record/list?page=1&size=10&userId=10001&redemptionCode=VIP
{
"code": 200,
"message": "success",
"success": true,
"data": {
"records": [
{
"id": 5001,
"userId": 10001,
"redemptionId": 200,
"redemptionCode": "VIP888",
"points": 100,
"expireTime": "2024-12-31 23:59:59",
"createTime": "2023-11-01 10:00:00",
"nickname": "TestUser",
"email": "test@example.com",
"appleUserId": "apple_001",
"originalTransactionId": "txn_001",
"platform": "IOS",
"language": "en-US"
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1
},
"timestamp": 1698804000000
}