mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 13:49:19 +08:00
refactor: 完全迁移店铺概览和商品概览到bi层
This commit is contained in:
@@ -11,7 +11,7 @@ import { requestClient } from '#/api/request';
|
||||
*/
|
||||
export async function getProductOverviewApi(params: ProductOverviewDTO.Query) {
|
||||
return requestClient.post<ProductOverviewVO.Overview>(
|
||||
'/ec/product/overview',
|
||||
'/bi/product/overview',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,20 @@ export async function getShopProductPageApi(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺概览统计(BI:Mongo 订单日汇聚)
|
||||
*/
|
||||
export async function getShopOverviewApi(params: {
|
||||
shopId: number;
|
||||
dateRange: string[];
|
||||
taxRate?: number;
|
||||
}) {
|
||||
return requestClient.post<ShopVO.OverviewStatistics>(
|
||||
'/bi/shop/overview',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺数据统计-按商品汇总(Excel)
|
||||
*/
|
||||
@@ -70,20 +84,7 @@ export async function exportShopSummaryByProductApi(params: {
|
||||
dateRange: string[];
|
||||
exportType?: string;
|
||||
}) {
|
||||
return requestClient.post('/ec/shop/export/summary-by-product', params, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 全店概览-按店铺汇总(Excel)
|
||||
*/
|
||||
export async function exportCompanyOverviewApi(params: {
|
||||
dateRange: string[];
|
||||
shopIds?: number[];
|
||||
exportType?: string;
|
||||
}) {
|
||||
return requestClient.post('/ec/store-overview/export/by-shop', params, {
|
||||
return requestClient.post('/bi/shop/export/summary-by-product', params, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
import type { CompanyOverviewDTO, CompanyOverviewVO } from './types';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 全店概览 API(统计与导出)
|
||||
*/
|
||||
|
||||
/**
|
||||
* 获取全店概览统计数据
|
||||
*/
|
||||
export async function getCompanyOverviewApi(data: CompanyOverviewDTO.Query) {
|
||||
return requestClient.post<CompanyOverviewVO.Info>(
|
||||
'/ec/store/overview',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全店概览-按品类汇总(Excel)
|
||||
*/
|
||||
export async function exportCategoryOverviewApi(params: {
|
||||
dateRange: string[];
|
||||
categoryIds?: number[];
|
||||
taxRate: number;
|
||||
}) {
|
||||
return requestClient.post('/ec/store-overview/export/by-category', params, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 全店概览-按店铺汇总(Excel)
|
||||
*/
|
||||
export async function exportCompanyOverviewApi(params: {
|
||||
dateRange: string[];
|
||||
shopIds?: number[];
|
||||
exportType?: string;
|
||||
}) {
|
||||
return requestClient.post('/ec/store-overview/export/by-shop', params, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
/**
|
||||
* 全店铺概览管理模块API导出
|
||||
* 工作台底表等复用的汇总表类型(原全店概览 VO,页面已下线)。
|
||||
*/
|
||||
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/**
|
||||
* 全店铺概览管理模块类型定义导出
|
||||
* 工作台汇总表类型(原全店概览 VO 字段,页面已下线)。
|
||||
*/
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* 全店铺概览相关DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace CompanyOverviewDTO {
|
||||
/** 全店铺概览查询参数 */
|
||||
export interface Query {
|
||||
/** 日期范围数组(第一个是开始日期,第二个是结束日期,只有一个日期则返回当天数据) */
|
||||
dateRange: string[];
|
||||
/** 税率(默认0.04,即4%) */
|
||||
taxRate?: number;
|
||||
}
|
||||
}
|
||||
@@ -257,7 +257,7 @@ export namespace CompanyOverviewVO {
|
||||
categories: CategorySummary[];
|
||||
}
|
||||
|
||||
/** 工作台底部四张汇总表(与全店概览同源字段) */
|
||||
/** 工作台底部四张汇总表 */
|
||||
export interface WorkbenchTableBundle {
|
||||
shopTable?: ShopOverview | null;
|
||||
platformTable?: PlatformOverview | null;
|
||||
|
||||
Reference in New Issue
Block a user