fix and add
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
@@ -134,14 +134,14 @@ export namespace AgentApi {
|
||||
agent_id?: number;
|
||||
status?: number;
|
||||
withdraw_no?: string;
|
||||
status?: number;
|
||||
withdraw_no?: string;
|
||||
}
|
||||
|
||||
// 提现统计数据
|
||||
export interface WithdrawalStatistics {
|
||||
total_withdrawal_amount: number;
|
||||
today_withdrawal_amount: number;
|
||||
total_actual_amount: number;
|
||||
total_tax_amount: number;
|
||||
}
|
||||
|
||||
// 代理订单统计数据
|
||||
@@ -156,6 +156,20 @@ export interface AgentStatistics {
|
||||
today_agent_count: number; // 今日新增代理数
|
||||
}
|
||||
|
||||
// 代理链接产品统计项
|
||||
export interface AgentLinkProductStatisticsItem {
|
||||
product_name: string;
|
||||
link_count: number;
|
||||
}
|
||||
|
||||
// 代理链接产品统计响应
|
||||
export interface AgentLinkProductStatisticsResp {
|
||||
items: AgentLinkProductStatisticsItem[];
|
||||
}
|
||||
|
||||
// 代理链接产品统计请求参数
|
||||
export interface GetAgentLinkProductStatisticsParams {}
|
||||
|
||||
// 代理上级抽佣相关接口
|
||||
export interface AgentCommissionDeductionListItem {
|
||||
id: number;
|
||||
@@ -517,10 +531,20 @@ async function getAgentStatistics() {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代理链接产品统计数据
|
||||
*/
|
||||
async function getAgentLinkProductStatistics() {
|
||||
return requestClient.get<AgentApi.AgentLinkProductStatisticsResp>(
|
||||
'/agent/agent-link/product-statistics',
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
getAgentCommissionDeductionList,
|
||||
getAgentCommissionList,
|
||||
getAgentLinkList,
|
||||
getAgentLinkProductStatistics,
|
||||
getAgentList,
|
||||
getAgentMembershipConfigList,
|
||||
getAgentOrderStatistics,
|
||||
|
||||
28
apps/web-antd/src/api/order/order-statistics.ts
Normal file
28
apps/web-antd/src/api/order/order-statistics.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace OrderStatisticsApi {
|
||||
// 订单统计数据项
|
||||
export interface OrderStatisticsItem {
|
||||
date: string; // 日期
|
||||
count: number; // 订单数量
|
||||
amount: number; // 订单金额
|
||||
}
|
||||
|
||||
// 订单统计响应
|
||||
export interface OrderStatisticsResponse {
|
||||
items: OrderStatisticsItem[];
|
||||
}
|
||||
|
||||
// 时间维度类型
|
||||
export type TimeDimension = 'day' | 'month' | 'year' | 'all';
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单统计数据
|
||||
* @param dimension 时间维度:day-日(当月1号到今天),month-月(今年1月到当月),year-年(过去5年),all-全部(按日统计)
|
||||
*/
|
||||
export function getOrderStatistics(dimension: OrderStatisticsApi.TimeDimension) {
|
||||
return requestClient.get<OrderStatisticsApi.OrderStatisticsResponse>('/order/statistics', {
|
||||
params: { dimension }
|
||||
});
|
||||
}
|
||||
@@ -49,6 +49,12 @@ export namespace OrderApi {
|
||||
total_profit_amount: number;
|
||||
today_profit_amount: number;
|
||||
}
|
||||
|
||||
// 订单来源统计数据
|
||||
export interface OrderSourceStatistics {
|
||||
product_name: string;
|
||||
order_count: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,4 +92,11 @@ async function getIncomeStatistics() {
|
||||
return requestClient.get<OrderApi.IncomeStatistics>('/order/revenue-statistics');
|
||||
}
|
||||
|
||||
export { getOrderList, refundOrder, getRefundStatistics, getIncomeStatistics };
|
||||
/**
|
||||
* 获取订单来源统计数据
|
||||
*/
|
||||
async function getOrderSourceStatistics() {
|
||||
return requestClient.get<{ items: OrderApi.OrderSourceStatistics[] }>('/order/source-statistics');
|
||||
}
|
||||
|
||||
export { getOrderList, refundOrder, getRefundStatistics, getIncomeStatistics, getOrderSourceStatistics };
|
||||
|
||||
Reference in New Issue
Block a user