/billing/records/{tenant_id}
按租户维度分页查询计费记录,可选 app_id 过滤。默认按时间倒序排列,含发票编号、金额、币种、状态等字段。
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
tenant_id |
path |
string |
Yes | 租户ID | |||
app_id |
query |
string |
No | 应用ID | |||
page |
query |
integer |
No | 1 |
页码 | ||
page_size |
query |
integer |
No | 20 |
每页条数 |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 计费记录查询成功 | dto.BillingRecordListResponse |
| 400 | 请求参数错误 | object |
| 401 | 未授权 | object |
| 500 | 服务器内部错误 | object |
Referenced Schemas
dto.BillingRecordListResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
items |
array of |
No | 统一使用 items | ||
message |
string |
No | |||
pagination |
object |
No | 分页信息(嵌套对象) | ||
timestamp |
string |
No | |||
total |
integer |
No | 总条数(平铺,便于直接读取) |
dto.BillingRecordResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
amount |
number |
No | 99 |
||
app_id |
string |
No | app_001 |
||
created_at |
string |
No | 2026-04-01T00:00:00Z |
||
currency |
string |
No | CNY |
||
description |
string |
No | 专业版月度订阅 |
||
invoice_number |
string |
No | INV-2026-001 |
||
line_items |
array of |
No | |||
record_id |
string |
No | rec_001 |
||
status |
string |
No | paid |
||
tenant_id |
string |
No | tnt_xyz789 |
||
type |
string |
No | subscription |
dto.InvoiceLineItemResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
amount |
number |
No | 99 |
||
description |
string |
No | 专业版月度订阅 |
||
quantity |
integer |
No | 1 |
||
resource_type |
string |
No | subscription |
||
tax_amount |
number |
No | 5.94 |
||
tax_rate |
number |
No | 0.06 |
||
unit_price |
number |
No | 99 |
gitee_com_linmes_authms_base_dto.PageInfo
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
has_next |
boolean |
No | HasNext indicates whether there is a next page | ||
has_prev |
boolean |
No | HasPrev indicates whether there is a previous page | ||
page |
integer |
No | Page is the current page number (1-based) | ||
page_size |
integer |
No | PageSize is the number of items per page | ||
total |
integer |
No | Total is the total number of items across all pages | ||
total_pages |
integer |
No | TotalPages is the total number of pages |