本文档描述了用户积分使用记录相关的接口规范。
/v2/user/points/usage/listGET| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
page |
integer | 否 | 页码,默认 1 |
size |
integer | 否 | 每页大小,默认 10 |
userId |
long | 否 | 用户ID |
keyword |
string | 否 | 关键词 (标题或订单ID) |
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 中的对象 (UserPointsUsageVO) 结构如下:
| 字段名 | 类型 | 说明 |
|---|---|---|
id |
long | 记录ID |
userId |
long | 用户ID |
points |
long | 消耗点数 |
recordId |
long | 变更记录ID |
orderId |
string | 订单ID |
title |
string | 标题 |
thumbUrl |
string | 缩略图 |
createTime |
string | 创建时间 |
nickname |
string | 用户昵称 |
email |
string | 用户邮箱 |
appleUserId |
string | 苹果用户ID |
originalTransactionId |
string | 原始交易ID |
platform |
string | 平台 |
language |
string | 语言 |
GET /v2/user/points/usage/list?page=1&size=10&userId=12345&keyword=购买
{
"code": 200,
"message": "success",
"success": true,
"data": {
"records": [
{
"id": 1001,
"userId": 12345,
"points": 50,
"recordId": 2001,
"orderId": "ORDER_123",
"title": "购买商品A",
"thumbUrl": "http://example.com/thumb.jpg",
"createTime": "2023-10-27 10:00:00",
"nickname": "User123",
"email": "user@example.com",
"appleUserId": "apple_123",
"originalTransactionId": "txn_123",
"platform": "IOS",
"language": "zh-CN"
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1
},
"timestamp": 1698372000000
}