feat: add superadmin wallet view
This commit is contained in:
@@ -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": [
|
||||
|
||||
@@ -1254,6 +1254,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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",
|
||||
@@ -5948,6 +5981,71 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
|
||||
@@ -1280,6 +1280,51 @@ definitions:
|
||||
description: VerifiedAt 实名认证时间(RFC3339)。
|
||||
type: string
|
||||
type: object
|
||||
dto.SuperWalletResponse:
|
||||
properties:
|
||||
balance:
|
||||
description: Balance 账户可用余额(分)。
|
||||
type: integer
|
||||
balance_frozen:
|
||||
description: BalanceFrozen 账户冻结余额(分)。
|
||||
type: integer
|
||||
transactions:
|
||||
description: Transactions 最近交易记录。
|
||||
items:
|
||||
$ref: '#/definitions/dto.SuperWalletTransaction'
|
||||
type: array
|
||||
type: object
|
||||
dto.SuperWalletTransaction:
|
||||
properties:
|
||||
amount:
|
||||
description: Amount 交易金额(分)。
|
||||
type: integer
|
||||
date:
|
||||
description: Date 交易时间(RFC3339)。
|
||||
type: string
|
||||
id:
|
||||
description: ID 订单ID。
|
||||
type: integer
|
||||
order_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.OrderType'
|
||||
description: 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
|
||||
type: object
|
||||
dto.SuperWithdrawalRejectForm:
|
||||
properties:
|
||||
reason:
|
||||
@@ -2815,6 +2860,28 @@ paths:
|
||||
summary: List user tenants
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/{id}/wallet:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get user wallet balance and transactions
|
||||
parameters:
|
||||
- description: User ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.SuperWalletResponse'
|
||||
summary: Get user wallet
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/statistics:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user