新增:统计订单总额功能

This commit is contained in:
2025-07-30 18:41:20 +08:00
parent 6aa57e3097
commit 75aeccbb1a
9 changed files with 899 additions and 23 deletions

View File

@@ -118,3 +118,19 @@ export async function repairOrder(data: ShopOrder) {
}
return Promise.reject(new Error(res.data.message));
}
/**
* 统计订单总金额(只统计有效订单)
*/
export async function shopOrderTotal(params?: ShopOrderParam) {
const res = await request.get<ApiResult<ShopOrder[]>>(
MODULES_API_URL + '/shop/shop-order/total',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}