wip: 数据导入

This commit is contained in:
ah--desktop
2025-11-04 23:16:24 +08:00
parent b0a4547e28
commit 5e0a085648
52 changed files with 1233 additions and 67 deletions
@@ -0,0 +1,49 @@
import type { OrderStatusDTO, OrderStatusVO } from './types';
import { requestClient } from '#/api/request';
/**
* 订单状态管理API
*/
/**
* 创建订单状态
*/
export async function createOrderStatusApi(data: OrderStatusDTO.Create) {
return requestClient.post<number>('/ec/order-status', data);
}
/**
* 更新订单状态
*/
export async function updateOrderStatusApi(data: OrderStatusDTO.Update) {
return requestClient.put('/ec/order-status', data);
}
/**
* 删除订单状态
*/
export async function deleteOrderStatusApi(id: number) {
return requestClient.delete(`/ec/order-status/${id}`);
}
/**
* 获取订单状态详情
*/
export async function getOrderStatusByIdApi(id: number) {
return requestClient.get<OrderStatusVO.Info>(`/ec/order-status/${id}`);
}
/**
* 获取启用的订单状态列表
*/
export async function getActiveOrderStatusListApi() {
return requestClient.get<OrderStatusVO.Info[]>('/ec/order-status/active');
}
/**
* 获取所有订单状态列表
*/
export async function getAllOrderStatusListApi() {
return requestClient.get<OrderStatusVO.Info[]>('/ec/order-status/all');
}
@@ -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,31 @@
/**
* 订单状态相关DTO类型定义
*/
export namespace OrderStatusDTO {
/** 创建订单状态参数 */
export interface Create {
/** 状态名称 */
statusName: string;
/** 状态描述 */
description?: string;
/** 排序 */
sortOrder?: number;
/** 是否启用 0禁用 1启用 */
isActive?: number;
}
/** 更新订单状态参数 */
export interface Update {
/** 状态ID */
id: number;
/** 状态名称 */
statusName: string;
/** 状态描述 */
description?: string;
/** 排序 */
sortOrder?: number;
/** 是否启用 0禁用 1启用 */
isActive?: number;
}
}
@@ -0,0 +1,31 @@
/**
* 订单状态相关VO类型定义
*/
export namespace OrderStatusVO {
/** 订单状态信息 */
export interface Info {
/** 状态ID */
id: number;
/** 公司ID */
companyId: number;
/** 状态码 */
statusCode: number;
/** 状态名称 */
statusName: string;
/** 状态描述 */
description?: string;
/** 排序 */
sortOrder?: number;
/** 是否启用 0禁用 1启用 */
isActive: number;
/** 创建时间 */
createTime: string;
/** 更新时间 */
updateTime: string;
/** 创建人ID */
createBy?: number;
/** 更新人ID */
updateBy?: number;
}
}