mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 08:29:19 +08:00
修复类型报错
This commit is contained in:
@@ -7,3 +7,6 @@ export * from './shop.apis';
|
||||
|
||||
// 商品相关API
|
||||
export * from './product.apis';
|
||||
|
||||
// 推广费相关API
|
||||
export * from './promotion-fee.apis';
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
import type { PromotionFeeDTO, PromotionFeeVO } from './types';
|
||||
|
||||
/**
|
||||
* 推广费管理API
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分页获取推广费记录列表
|
||||
*/
|
||||
export async function getPromotionFeePageApi(params: PageQueryDTO<PromotionFeeDTO.Filters>) {
|
||||
return requestClient.post<PageResultVO<PromotionFeeVO.Info>>('/ec/promotion-fee/page', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建推广费记录
|
||||
*/
|
||||
export async function createPromotionFeeApi(data: PromotionFeeDTO.Create) {
|
||||
return requestClient.post<number>('/ec/promotion-fee', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推广费记录
|
||||
*/
|
||||
export async function updatePromotionFeeApi(data: PromotionFeeDTO.Update) {
|
||||
return requestClient.put<void>('/ec/promotion-fee', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推广费记录
|
||||
*/
|
||||
export async function deletePromotionFeeApi(id: number) {
|
||||
return requestClient.delete<void>(`/ec/promotion-fee/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推广费记录详情
|
||||
*/
|
||||
export async function getPromotionFeeByIdApi(id: number) {
|
||||
return requestClient.get<PromotionFeeVO.Info>(`/ec/promotion-fee/${id}`);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* 推广费管理相关DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace PromotionFeeDTO {
|
||||
/** 推广费查询过滤条件 */
|
||||
export interface Filters {
|
||||
/** 店铺ID */
|
||||
shopId?: number;
|
||||
/** 推广费类型ID */
|
||||
feeTypeId?: number;
|
||||
/** 平台 */
|
||||
platform?: string;
|
||||
/** 推广费发生日期开始 */
|
||||
feeDateStart?: string;
|
||||
/** 推广费发生日期结束 */
|
||||
feeDateEnd?: string;
|
||||
}
|
||||
|
||||
/** 创建推广费记录 */
|
||||
export interface Create {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 推广费类型ID */
|
||||
feeTypeId: number;
|
||||
/** 推广费名称 */
|
||||
feeName: string;
|
||||
/** 平台(淘宝、京东、拼多多等) */
|
||||
platform?: string;
|
||||
/** 推广活动名称 */
|
||||
campaignName?: string;
|
||||
/** 推广费金额 */
|
||||
feeAmount: number;
|
||||
/** 基础金额(用于按比例计算) */
|
||||
baseAmount?: number;
|
||||
/** 费率(用于按比例计算) */
|
||||
feeRate?: number;
|
||||
/** 点击次数 */
|
||||
clickCount?: number;
|
||||
/** 展示次数 */
|
||||
impressionCount?: number;
|
||||
/** 转化次数 */
|
||||
conversionCount?: number;
|
||||
/** 推广费发生日期 */
|
||||
feeDate: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 更新推广费记录 */
|
||||
export interface Update {
|
||||
/** 推广费记录ID */
|
||||
id: number;
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 推广费类型ID */
|
||||
feeTypeId: number;
|
||||
/** 推广费名称 */
|
||||
feeName: string;
|
||||
/** 平台(淘宝、京东、拼多多等) */
|
||||
platform?: string;
|
||||
/** 推广活动名称 */
|
||||
campaignName?: string;
|
||||
/** 推广费金额 */
|
||||
feeAmount: number;
|
||||
/** 基础金额(用于按比例计算) */
|
||||
baseAmount?: number;
|
||||
/** 费率(用于按比例计算) */
|
||||
feeRate?: number;
|
||||
/** 点击次数 */
|
||||
clickCount?: number;
|
||||
/** 展示次数 */
|
||||
impressionCount?: number;
|
||||
/** 转化次数 */
|
||||
conversionCount?: number;
|
||||
/** 推广费发生日期 */
|
||||
feeDate: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,9 @@
|
||||
// DTO类型导出
|
||||
export * from './dto.shop';
|
||||
export * from './dto.product';
|
||||
export * from './dto.promotion-fee';
|
||||
|
||||
// VO类型导出
|
||||
export * from './vo.shop';
|
||||
export * from './vo.product';
|
||||
export * from './vo.promotion-fee';
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 推广费管理相关VO类型定义
|
||||
*/
|
||||
|
||||
export namespace PromotionFeeVO {
|
||||
/** 推广费记录信息 */
|
||||
export interface Info {
|
||||
/** 推广费记录ID */
|
||||
id: number;
|
||||
/** 公司ID */
|
||||
companyId: number;
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName?: string;
|
||||
/** 推广费类型ID */
|
||||
feeTypeId: number;
|
||||
/** 推广费类型名称 */
|
||||
feeTypeName?: string;
|
||||
/** 推广费名称 */
|
||||
feeName: string;
|
||||
/** 平台(淘宝、京东、拼多多等) */
|
||||
platform?: string;
|
||||
/** 推广活动名称 */
|
||||
campaignName?: string;
|
||||
/** 推广费金额 */
|
||||
feeAmount: number;
|
||||
/** 基础金额(用于按比例计算) */
|
||||
baseAmount?: number;
|
||||
/** 费率(用于按比例计算) */
|
||||
feeRate?: number;
|
||||
/** 点击次数 */
|
||||
clickCount?: number;
|
||||
/** 展示次数 */
|
||||
impressionCount?: number;
|
||||
/** 转化次数 */
|
||||
conversionCount?: number;
|
||||
/** 推广费发生日期 */
|
||||
feeDate: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
updateTime?: string;
|
||||
/** 创建人ID */
|
||||
createBy?: number;
|
||||
/** 更新人ID */
|
||||
updateBy?: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user