用户管理增加余额调账功能
支持后台加减可用余额并写入资金流水与审计,优化操作列按钮样式。
This commit is contained in:
@@ -13,6 +13,8 @@ export interface AdminUserItem {
|
||||
deposit_free_quota_cent: number
|
||||
deposit_free_used_cent: number
|
||||
deposit_free_remaining_cent: number
|
||||
available_balance_cent: number
|
||||
frozen_balance_cent: number
|
||||
status: UserStatus
|
||||
order_count: number
|
||||
listing_count: number
|
||||
@@ -22,6 +24,13 @@ export interface AdminUserItem {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface AdminWalletAdjustPayload {
|
||||
direction: 'in' | 'out'
|
||||
amount_cent: number
|
||||
reason: string
|
||||
reference_no?: string
|
||||
}
|
||||
|
||||
export interface AdminUserQuery {
|
||||
keyword?: string
|
||||
status?: '' | UserStatus
|
||||
@@ -84,3 +93,16 @@ export async function manualAdminUserRealname(
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adjustAdminUserWallet(id: number, payload: AdminWalletAdjustPayload) {
|
||||
const { data } = await apiClient.post<ApiResponse<AdminUserItem>>(
|
||||
`/admin/users/${id}/wallet/adjust`,
|
||||
{
|
||||
direction: payload.direction,
|
||||
amount_cent: payload.amount_cent,
|
||||
reason: payload.reason,
|
||||
reference_no: payload.reference_no || undefined,
|
||||
}
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user