POST /internal/billing/export-user-data
服务间内部调用(compliance-service):导出指定用户在计费服务中的所有关联数据,含订阅、计费记录、信用余额、使用统计、用量告警和计量记录
计费服务 - 内部接口 None application/json
Referenced Schemas
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
See dto.InvoiceLineItemResponse |
No |
|
|
|
record_id |
string |
No |
rec_001 |
|
|
status |
string |
No |
paid |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
type |
string |
No |
subscription |
|
|
dto.CreditBalanceResponse
| Field | Type | Required | Example | Constraints | Description |
balance |
number |
No |
150 |
|
|
currency |
string |
No |
CNY |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
updated_at |
string |
No |
2026-05-12T10:00:00Z |
|
|
dto.CreditTransactionResponse
| Field | Type | Required | Example | Constraints | Description |
amount |
number |
No |
50 |
|
|
balance |
number |
No |
150 |
|
|
created_at |
string |
No |
2026-05-12T10:00:00Z |
|
|
id |
string |
No |
ctr_001 |
|
|
remark |
string |
No |
套餐降级按比例信用 |
|
|
source |
string |
No |
proration |
|
|
source_id |
string |
No |
sub_xyz789 |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
type |
string |
No |
credit |
|
|
dto.ExportUserDataResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.ExportUserDataResult |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.ExportUserDataResult
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 |
|
|
dto.MeteredBillingExportItem
| Field | Type | Required | Example | Constraints | Description |
included_units |
integer |
No |
|
|
|
overage_amount |
string |
No |
|
|
|
overage_units |
integer |
No |
|
|
|
period_end |
string |
No |
|
|
|
period_start |
string |
No |
|
|
|
resource_type |
string |
No |
|
|
|
status |
string |
No |
|
|
|
total_usage |
integer |
No |
|
|
|
dto.SubscriptionResponse
| Field | Type | Required | Example | Constraints | Description |
admin_user_id |
string |
No |
usr_abc123 |
|
|
amount |
number |
No |
499 |
|
|
auto_renew |
boolean |
No |
True |
|
|
billing_cycle |
string |
No |
monthly |
|
|
cancel_at_period_end |
boolean |
No |
False |
|
|
currency |
string |
No |
CNY |
|
|
current_period_end |
string |
No |
2026-02-01T00:00:00Z |
|
|
current_period_start |
string |
No |
2026-01-01T00:00:00Z |
|
|
grace_period_days |
integer |
No |
7 |
|
|
plan_id |
string |
No |
pro |
|
|
status |
string |
No |
active |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
trial_end_date |
string |
No |
2026-01-15T00:00:00Z |
|
|
dto.UsageAlertResponse
| Field | Type | Required | Example | Constraints | Description |
app_id |
string |
No |
app_001 |
|
|
created_at |
string |
No |
2026-05-01T00:00:00Z |
|
|
id |
string |
No |
ua_001 |
|
|
last_triggered_at |
string |
No |
2026-05-10T08:00:00Z |
|
|
name |
string |
No |
API调用量告警 |
|
|
notification_channels |
string |
No |
email,in_app |
|
|
resource_type |
string |
No |
api_calls |
|
|
status |
string |
No |
active |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
threshold_percent |
integer |
No |
80 |
|
|
updated_at |
string |
No |
2026-05-05T10:00:00Z |
|
|
dto.UsageStatsExportItem
| Field | Type | Required | Example | Constraints | Description |
api_requests |
integer |
No |
|
|
|
bandwidth_used |
integer |
No |
|
|
|
date |
string |
No |
|
|
|
failed_logins |
integer |
No |
|
|
|
login_attempts |
integer |
No |
|
|
|
mfa_verifications |
integer |
No |
|
|
|
storage_used |
integer |
No |
|
|
|
user_count |
integer |
No |
|
|
|