feat(order): 订单字段信息硬编码,新增 GET /ec/order/fields 接口

- 新增 OrderFieldVO / OrderFieldConstants,替代动态库表字段
- OrderController 新增 /ec/order/fields 接口
- 前端导入向导和映射弹窗改用新接口
This commit is contained in:
小蟑螂
2026-05-19 02:07:23 +08:00
parent bb51ae5d91
commit 40664d0162
7 changed files with 157 additions and 50 deletions
@@ -1,4 +1,4 @@
import type { BatchImportResultVO, OrderDTO, OrderVO } from './types';
import type { BatchImportResultVO, OrderDTO, OrderFieldVO, OrderVO } from './types';
import type { PageQueryDTO, PageResultVO } from '#/types/common';
@@ -62,3 +62,10 @@ export async function batchImportOrdersApi(data: OrderDTO.BatchImport) {
data,
);
}
/**
* 获取订单字段信息列表
*/
export async function getOrderFieldsApi() {
return requestClient.get<OrderFieldVO.Info[]>('/ec/order/fields');
}
@@ -67,6 +67,27 @@ export namespace OrderVO {
}
}
/**
* 订单字段信息VO
*/
export namespace OrderFieldVO {
/** 订单字段信息 */
export interface Info {
/** 数据库字段名 */
fieldName: string;
/** 中文字段名 */
fieldLabel: string;
/** 文件字段名 */
fileFieldName?: string;
/** 是否必填 */
required: boolean;
/** 排序 */
sort?: number;
/** 数据类型 */
dataType?: string;
}
}
/**
* 批量导入结果相关VO类型定义
*/