feat(distribution): 独立分销前台商城多租户体系、货源与订单数据严格隔离
This commit is contained in:
@@ -170,6 +170,61 @@ export interface AccountDisplay {
|
||||
account_id: number
|
||||
listing_id: number
|
||||
display_status: string
|
||||
listing_no?: string
|
||||
title?: string
|
||||
game_name?: string
|
||||
server_region?: string
|
||||
login_platform?: string
|
||||
rank_level?: string
|
||||
haf_coin_amount?: number
|
||||
price_cent?: number
|
||||
deposit_amount_cent?: number
|
||||
listing_status?: string
|
||||
in_transaction?: boolean
|
||||
}
|
||||
|
||||
export interface SyncSiteAccountsResult {
|
||||
synced_count: number
|
||||
skipped_count: number
|
||||
total_active: number
|
||||
}
|
||||
|
||||
export interface PublicDistributionListing {
|
||||
listing_id: number
|
||||
listing_no: string
|
||||
account_id: number
|
||||
title: string
|
||||
game_name: string
|
||||
server_region: string
|
||||
login_platform: string
|
||||
rank_level: string
|
||||
haf_coin_amount: number
|
||||
price_cent: number
|
||||
deposit_amount_cent: number
|
||||
in_transaction: boolean
|
||||
site_code: string
|
||||
site_name: string
|
||||
}
|
||||
|
||||
export interface PublicDistributionListingsResult {
|
||||
items: PublicDistributionListing[]
|
||||
total: number
|
||||
page: number
|
||||
page_size: number
|
||||
}
|
||||
|
||||
export async function fetchPublicSiteListings(
|
||||
siteCode: string,
|
||||
page = 1,
|
||||
pageSize = 24,
|
||||
): Promise<PublicDistributionListingsResult> {
|
||||
const resp = await api.get<ApiResponse<PublicDistributionListingsResult>>(
|
||||
`/distribution/sites/${siteCode}/listings`,
|
||||
{
|
||||
params: { page, page_size: pageSize },
|
||||
},
|
||||
)
|
||||
return extract(resp)
|
||||
}
|
||||
|
||||
export interface PaymentChannel {
|
||||
@@ -297,6 +352,11 @@ export async function updateAccountDisplay(id: number, displayStatus: string): P
|
||||
return extract(resp)
|
||||
}
|
||||
|
||||
export async function syncSiteAccounts(siteID: number): Promise<SyncSiteAccountsResult> {
|
||||
const resp = await api.post<ApiResponse<SyncSiteAccountsResult>>(`/admin/distribution/sites/${siteID}/sync-accounts`)
|
||||
return extract(resp)
|
||||
}
|
||||
|
||||
export async function listPaymentChannels(siteID: number): Promise<PaymentChannel[]> {
|
||||
const resp = await api.get<ApiResponse<{ items: PaymentChannel[] }>>('/admin/distribution/payment-channels', {
|
||||
params: { site_id: siteID },
|
||||
|
||||
Reference in New Issue
Block a user