feat: add superadmin wallet view

This commit is contained in:
2026-01-15 11:21:37 +08:00
parent 37325ab1b4
commit 56082bad4f
10 changed files with 495 additions and 5 deletions

View File

@@ -1260,6 +1260,39 @@ const docTemplate = `{
}
}
},
"/super/v1/users/{id}/wallet": {
"get": {
"description": "Get user wallet balance and transactions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get user wallet",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SuperWalletResponse"
}
}
}
}
},
"/super/v1/withdrawals": {
"get": {
"description": "List withdrawal orders across tenants",
@@ -5954,6 +5987,71 @@ const docTemplate = `{
}
}
},
"dto.SuperWalletResponse": {
"type": "object",
"properties": {
"balance": {
"description": "Balance 账户可用余额(分)。",
"type": "integer"
},
"balance_frozen": {
"description": "BalanceFrozen 账户冻结余额(分)。",
"type": "integer"
},
"transactions": {
"description": "Transactions 最近交易记录。",
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperWalletTransaction"
}
}
}
},
"dto.SuperWalletTransaction": {
"type": "object",
"properties": {
"amount": {
"description": "Amount 交易金额(分)。",
"type": "integer"
},
"date": {
"description": "Date 交易时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 订单ID。",
"type": "integer"
},
"order_type": {
"description": "OrderType 订单类型。",
"allOf": [
{
"$ref": "#/definitions/consts.OrderType"
}
]
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 交易所属租户ID充值为0。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"title": {
"description": "Title 交易标题。",
"type": "string"
},
"type": {
"description": "Type 交易流向income/expense。",
"type": "string"
}
}
},
"dto.SuperWithdrawalRejectForm": {
"type": "object",
"required": [