mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 07:09:20 +08:00
1
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import type { BrushOrderDTO, BrushOrderVO } from './types';
|
||||
|
||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 刷单记录管理API
|
||||
*/
|
||||
|
||||
/**
|
||||
* 创建刷单记录
|
||||
*/
|
||||
export async function createBrushOrderApi(data: BrushOrderDTO.Create) {
|
||||
return requestClient.post<BrushOrderVO.Info>('/ec/brush-order/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新刷单记录
|
||||
*/
|
||||
export async function updateBrushOrderApi(
|
||||
id: number,
|
||||
data: BrushOrderDTO.Update,
|
||||
) {
|
||||
return requestClient.put<BrushOrderVO.Info>(
|
||||
`/ec/brush-order/update/${id}`,
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除刷单记录
|
||||
*/
|
||||
export async function deleteBrushOrderApi(id: number) {
|
||||
return requestClient.delete(`/ec/brush-order/delete/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取刷单记录列表
|
||||
*/
|
||||
export async function getBrushOrderPageApi(
|
||||
params: PageQueryDTO<BrushOrderDTO.Filters>,
|
||||
) {
|
||||
return requestClient.post<PageResultVO<BrushOrderVO.Info>>(
|
||||
'/ec/brush-order/page',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取刷单记录详情
|
||||
*/
|
||||
export async function getBrushOrderByIdApi(id: number) {
|
||||
return requestClient.get<BrushOrderVO.Info>(`/ec/brush-order/detail/${id}`);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 刷单记录管理模块API导出
|
||||
*/
|
||||
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 刷单记录管理模块类型定义导出
|
||||
*/
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 刷单记录相关DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace BrushOrderDTO {
|
||||
/** 创建刷单记录参数 */
|
||||
export interface Create {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 商品ID(可选) */
|
||||
productId?: number;
|
||||
/** 商品规格ID(可选) */
|
||||
productSpecId?: number;
|
||||
/** 刷单金额 */
|
||||
brushAmount: number;
|
||||
/** 刷单时间 */
|
||||
brushTime: string;
|
||||
/** 平台订单号(可选) */
|
||||
platformOrderNo?: string;
|
||||
/** 刷单数量 */
|
||||
quantity?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 更新刷单记录参数 */
|
||||
export interface Update {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 商品ID(可选) */
|
||||
productId?: number;
|
||||
/** 商品规格ID(可选) */
|
||||
productSpecId?: number;
|
||||
/** 刷单金额 */
|
||||
brushAmount: number;
|
||||
/** 刷单时间 */
|
||||
brushTime: string;
|
||||
/** 平台订单号(可选) */
|
||||
platformOrderNo?: string;
|
||||
/** 刷单数量 */
|
||||
quantity?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 刷单记录过滤条件 */
|
||||
export interface Filters {
|
||||
/** 店铺ID */
|
||||
shopId?: number;
|
||||
/** 商品ID */
|
||||
productId?: number;
|
||||
/** 平台订单号(模糊查询) */
|
||||
platformOrderNo?: string;
|
||||
/** 刷单金额范围-最小值 */
|
||||
minBrushAmount?: number;
|
||||
/** 刷单金额范围-最大值 */
|
||||
maxBrushAmount?: number;
|
||||
/** 刷单时间范围-开始时间 */
|
||||
startBrushTime?: string;
|
||||
/** 刷单时间范围-结束时间 */
|
||||
endBrushTime?: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* 刷单记录相关VO类型定义
|
||||
*/
|
||||
|
||||
export namespace BrushOrderVO {
|
||||
/** 刷单记录信息 */
|
||||
export interface Info {
|
||||
/** 刷单记录ID */
|
||||
id: number;
|
||||
/** 公司ID */
|
||||
companyId: number;
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName: string;
|
||||
/** 商品ID */
|
||||
productId?: number;
|
||||
/** 商品名称 */
|
||||
productName?: string;
|
||||
/** 商品规格ID */
|
||||
productSpecId?: number;
|
||||
/** 商品规格名称 */
|
||||
productSpecName?: string;
|
||||
/** 刷单金额 */
|
||||
brushAmount: number;
|
||||
/** 刷单时间 */
|
||||
brushTime: string;
|
||||
/** 平台订单号 */
|
||||
platformOrderNo?: string;
|
||||
/** 刷单数量 */
|
||||
quantity?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
updateTime: string;
|
||||
/** 创建人ID */
|
||||
createBy?: number;
|
||||
/** 更新人ID */
|
||||
updateBy?: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
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/company-overview/statistics',
|
||||
data,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 全店铺概览管理模块API导出
|
||||
*/
|
||||
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 全店铺概览管理模块类型定义导出
|
||||
*/
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 全店铺概览相关DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace CompanyOverviewDTO {
|
||||
/** 全店铺概览查询参数 */
|
||||
export interface Query {
|
||||
/** 日期范围数组(第一个是开始日期,第二个是结束日期,只有一个日期则返回当天数据) */
|
||||
dateRange: string[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* 全店铺概览相关VO类型定义
|
||||
*/
|
||||
|
||||
export namespace CompanyOverviewVO {
|
||||
/** 全店铺概览信息 */
|
||||
export interface Info {
|
||||
/** 全店总销售额 */
|
||||
totalSalesAmount: number;
|
||||
/** 较上月同期增长百分比 */
|
||||
monthOverMonthGrowth?: number;
|
||||
/** 全店总单量 */
|
||||
totalOrderCount: number;
|
||||
/** 总推广费支出 */
|
||||
totalPromotionFee: number;
|
||||
/** 平均费比(推广费/销售额) */
|
||||
averageFeeRatio?: number;
|
||||
/** 全店总净利(税后) */
|
||||
totalNetProfitAfterTax: number;
|
||||
/** 扣除总税额 */
|
||||
totalTaxAmount?: number;
|
||||
/** 各店铺销售占比排行 */
|
||||
shopSalesRatios?: ShopSalesRatio[];
|
||||
/** 店铺效率象限(ROI vs 净利) */
|
||||
shopEfficiencyQuadrants?: ShopEfficiencyQuadrant[];
|
||||
/** 多店铺数据横向对比(16维度) */
|
||||
shopComparisons?: ShopComparison[];
|
||||
/** 汇总ROI */
|
||||
totalROI?: number;
|
||||
/** 总税后盈亏 */
|
||||
totalProfitAfterTax?: number;
|
||||
}
|
||||
|
||||
/** 店铺销售占比 */
|
||||
export interface ShopSalesRatio {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName: string;
|
||||
/** 销售额 */
|
||||
salesAmount: number;
|
||||
/** 占比百分比 */
|
||||
ratio: number;
|
||||
}
|
||||
|
||||
/** 店铺效率象限 */
|
||||
export interface ShopEfficiencyQuadrant {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName: string;
|
||||
/** ROI */
|
||||
roi: number;
|
||||
/** 净利 */
|
||||
netProfit: number;
|
||||
/** 象限(1-高ROI高净利,2-高ROI低净利,3-低ROI高净利,4-低ROI低净利) */
|
||||
quadrant: number;
|
||||
}
|
||||
|
||||
/** 店铺对比数据(16维度) */
|
||||
export interface ShopComparison {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName: string;
|
||||
/** 平台 */
|
||||
platform?: string;
|
||||
/** 销售额 */
|
||||
salesAmount: number;
|
||||
/** ROI */
|
||||
roi?: number;
|
||||
/** 退款金额 */
|
||||
refundAmount?: number;
|
||||
/** 刷单费 */
|
||||
brushFee?: number;
|
||||
/** 推广费总和 */
|
||||
totalPromotionFee?: number;
|
||||
/** 税后盈亏 */
|
||||
profitAfterTax?: number;
|
||||
/** 订单数量 */
|
||||
orderCount?: number;
|
||||
/** 总成本 */
|
||||
totalCost?: number;
|
||||
/** 总利润(税前) */
|
||||
totalProfitBeforeTax?: number;
|
||||
/** 税额 */
|
||||
taxAmount?: number;
|
||||
/** 费比 */
|
||||
feeRatio?: number;
|
||||
/** 客单价 */
|
||||
averageOrderValue?: number;
|
||||
/** 利润率 */
|
||||
profitMargin?: number;
|
||||
/** 推广费占比 */
|
||||
promotionFeeRatio?: number;
|
||||
/** 退款率 */
|
||||
refundRate?: number;
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@ export namespace OrderStatusDTO {
|
||||
description?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 是否默认参与统计 0不参与 1参与 */
|
||||
isDefaultStat: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
}
|
||||
|
||||
/** 更新订单状态参数 */
|
||||
@@ -23,7 +23,7 @@ export namespace OrderStatusDTO {
|
||||
description?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 是否默认参与统计 0不参与 1参与 */
|
||||
isDefaultStat: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ export namespace OrderStatusVO {
|
||||
description?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 是否默认参与统计 0不参与 1参与 */
|
||||
isDefaultStat: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
|
||||
@@ -27,8 +27,14 @@ export namespace OrderDTO {
|
||||
quantity: number;
|
||||
/** 销售单价 */
|
||||
unitPrice: number;
|
||||
/** 成本价(下单时快照) */
|
||||
costPrice: number;
|
||||
/** 单件商品成本(下单时快照) */
|
||||
productCost: number;
|
||||
/** 单件运费成本(下单时快照) */
|
||||
shippingCost?: number;
|
||||
/** 单件其他成本(下单时快照) */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 更新订单参数 */
|
||||
@@ -55,8 +61,14 @@ export namespace OrderDTO {
|
||||
quantity?: number;
|
||||
/** 销售单价 */
|
||||
unitPrice?: number;
|
||||
/** 成本价(下单时快照) */
|
||||
costPrice?: number;
|
||||
/** 单件商品成本(下单时快照) */
|
||||
productCost?: number;
|
||||
/** 单件运费成本(下单时快照) */
|
||||
shippingCost?: number;
|
||||
/** 单件其他成本(下单时快照) */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 订单过滤条件 */
|
||||
|
||||
@@ -43,8 +43,14 @@ export namespace OrderVO {
|
||||
quantity: number;
|
||||
/** 销售单价 */
|
||||
unitPrice: number;
|
||||
/** 成本价(下单时快照) */
|
||||
costPrice: number;
|
||||
/** 单件商品成本(下单时快照) */
|
||||
productCost: number;
|
||||
/** 单件运费成本(下单时快照) */
|
||||
shippingCost?: number;
|
||||
/** 单件其他成本(下单时快照) */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,18 +11,32 @@ export namespace ProductSpecDTO {
|
||||
name: string;
|
||||
/** 规格编码 */
|
||||
specCode?: string;
|
||||
/** 成本价 */
|
||||
costPrice: number;
|
||||
/** 商品成本 */
|
||||
productCost: number;
|
||||
/** 运费成本 */
|
||||
shippingCost?: number;
|
||||
/** 其他成本 */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 更新商品规格参数 */
|
||||
export interface Update {
|
||||
/** 规格ID */
|
||||
id: number;
|
||||
/** 规格名称 */
|
||||
name: string;
|
||||
/** 规格编码 */
|
||||
specCode?: string;
|
||||
/** 成本价 */
|
||||
costPrice: number;
|
||||
/** 商品成本 */
|
||||
productCost: number;
|
||||
/** 运费成本 */
|
||||
shippingCost?: number;
|
||||
/** 其他成本 */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 商品规格过滤条件 */
|
||||
|
||||
@@ -17,8 +17,14 @@ export namespace ProductSpecVO {
|
||||
name: string;
|
||||
/** 规格编码 */
|
||||
specCode?: string;
|
||||
/** 成本价 */
|
||||
costPrice: number;
|
||||
/** 商品成本 */
|
||||
productCost: number;
|
||||
/** 运费成本 */
|
||||
shippingCost?: number;
|
||||
/** 其他成本 */
|
||||
otherCost?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
|
||||
Reference in New Issue
Block a user