addanalysis

This commit is contained in:
2025-12-27 13:51:08 +08:00
parent a718ac7874
commit b392f9cf0d
7 changed files with 265 additions and 126 deletions

View File

@@ -130,6 +130,12 @@ export namespace AgentApi {
withdraw_no?: string;
}
// 提现统计数据
export interface WithdrawalStatistics {
total_withdrawal_amount: number;
today_withdrawal_amount: number;
}
// 代理上级抽佣相关接口
export interface AgentCommissionDeductionListItem {
id: number;
@@ -446,6 +452,15 @@ async function updateAgentMembershipConfig(
);
}
/**
* 获取提现统计数据
*/
async function getWithdrawalStatistics() {
return requestClient.get<AgentApi.WithdrawalStatistics>(
'/agent/agent-withdrawal/statistics',
);
}
export {
getAgentCommissionDeductionList,
getAgentCommissionList,
@@ -457,6 +472,7 @@ export {
getAgentRewardList,
getAgentWithdrawalList,
getMembershipRechargeOrderList,
getWithdrawalStatistics,
updateAgentMembershipConfig,
updateAgentProductionConfig,
};

View File

@@ -11,6 +11,7 @@ export namespace OrderApi {
payment_platform: 'alipay' | 'appleiap' | 'wechat';
payment_scene: 'app' | 'h5' | 'mini_program' | 'public_account';
amount: number;
sales_cost: number;
status: 'closed' | 'failed' | 'paid' | 'pending' | 'refunded';
query_state: 'cleaned' | 'failed' | 'pending' | 'processing' | 'success';
create_time: string;
@@ -34,6 +35,20 @@ export namespace OrderApi {
refund_no: string;
amount: number;
}
// 退款统计数据
export interface RefundStatistics {
total_refund_amount: number;
today_refund_amount: number;
}
// 收入统计数据
export interface IncomeStatistics {
total_revenue_amount: number;
today_revenue_amount: number;
total_profit_amount: number;
today_profit_amount: number;
}
}
/**
@@ -57,4 +72,18 @@ async function refundOrder(id: number, data: OrderApi.RefundOrderRequest) {
);
}
export { getOrderList, refundOrder };
/**
* 获取退款统计数据
*/
async function getRefundStatistics() {
return requestClient.get<OrderApi.RefundStatistics>('/order/refund-statistics');
}
/**
* 获取收入统计数据
*/
async function getIncomeStatistics() {
return requestClient.get<OrderApi.IncomeStatistics>('/order/revenue-statistics');
}
export { getOrderList, refundOrder, getRefundStatistics, getIncomeStatistics };