/admin/wallets
为指定用户创建钱包,支持指定币种。参考:GAAP/IFRS (Double-Entry Accounting Principles)。
请求体
Schema: service-wallet/internal/handler/dto.CreateWalletRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
user_id |
string |
是 | usr_abc123 |
用户ID | |
currency |
string |
否 | CNY |
货币 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 201 | 钱包创建成功 | service-wallet/internal/handler/dto.WalletDetailResponse |
| 400 | 请求参数错误 | service-core/base/dto.SimpleResponse |
| 401 | 未认证或令牌无效 | service-core/base/dto.SimpleResponse |
| 500 | 服务内部错误 | service-core/base/dto.SimpleResponse |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-wallet/internal/handler/dto.WalletDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-wallet/internal/handler/dto.WalletResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-wallet/internal/handler/dto.WalletResponse
用户钱包信息
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
application_id |
string |
否 | app_abc123 |
应用ID | |
balance |
string |
否 | 1000.00 |
余额 | |
created_at |
string |
否 | 2026-01-01T00:00:00Z |
创建时间 | |
currency |
string |
否 | CNY |
货币 | |
frozen_balance |
string |
否 | 100.00 |
冻结 | |
status |
string |
否 | active |
状态 | |
tenant_id |
string |
否 | tnt_xyz789 |
租户ID | |
updated_at |
string |
否 | 2026-04-15T10:30:00Z |
更新时间 | |
user_id |
string |
否 | usr_abc123 |
用户ID | |
wallet_id |
string |
否 | wlt_abc123 |
钱包ID |