mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 07:49:19 +08:00
refactor: 删除动态导入字段定义模块(importfielddef),已由 OrderFieldVO 硬编码替代
- 删除后端 importfielddef 整个模块(controller/service/mapper/model) - 删除前端 import-field-def API 模块 - 删除前端 system/field 字段管理 CRUD 页面及路由 - ImportMappingFormModal 改用 getOrderFieldsApi
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
import type { ImportFieldDefDTO, ImportFieldDefVO } from './types';
|
||||
|
||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 导入字段定义管理API
|
||||
*/
|
||||
|
||||
/**
|
||||
* 创建导入字段定义
|
||||
*/
|
||||
export async function createImportFieldDefApi(
|
||||
data: ImportFieldDefDTO.CreateImportFieldDefDTO,
|
||||
) {
|
||||
return requestClient.post<ImportFieldDefVO.ImportFieldDefInfoVO>(
|
||||
'/ec/import-field-def/create',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新导入字段定义
|
||||
*/
|
||||
export async function updateImportFieldDefApi(
|
||||
id: number,
|
||||
data: ImportFieldDefDTO.UpdateImportFieldDefDTO,
|
||||
) {
|
||||
return requestClient.put<ImportFieldDefVO.ImportFieldDefInfoVO>(
|
||||
`/ec/import-field-def/update/${id}`,
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除导入字段定义
|
||||
*/
|
||||
export async function deleteImportFieldDefApi(id: number) {
|
||||
return requestClient.delete(`/ec/import-field-def/delete/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定类型所有字段列表
|
||||
*/
|
||||
export async function getFieldDefsByTypeApi(type: string) {
|
||||
return requestClient.get<ImportFieldDefVO.ImportFieldDefInfoVO[]>(
|
||||
`/ec/import-field-def/all/${type}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询导入字段定义
|
||||
*/
|
||||
export async function getImportFieldDefPageApi(
|
||||
params: PageQueryDTO<ImportFieldDefDTO.ImportFieldDefFilterDTO>,
|
||||
) {
|
||||
return requestClient.post<
|
||||
PageResultVO<ImportFieldDefVO.ImportFieldDefInfoVO>
|
||||
>('/ec/import-field-def/list', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量排序导入字段定义
|
||||
*/
|
||||
export async function batchSortImportFieldDefApi(
|
||||
data: ImportFieldDefDTO.BatchSortImportFieldDefDTO,
|
||||
) {
|
||||
return requestClient.post('/ec/import-field-def/batch-sort', data);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 导入字段定义模块API导出
|
||||
*/
|
||||
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 导入字段定义模块类型定义导出
|
||||
*/
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* 导入字段定义模块DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace ImportFieldDefDTO {
|
||||
/** 创建导入字段定义参数 */
|
||||
export interface CreateImportFieldDefDTO {
|
||||
/** 导入类型(product-商品 order-订单) */
|
||||
type: string;
|
||||
/** 数据库字段名,如 name */
|
||||
fieldName: string;
|
||||
/** 中文字段名,如 商品名称 */
|
||||
fieldLabel: string;
|
||||
/** 文件字段名,如 商品名称 */
|
||||
fileFieldName?: string;
|
||||
/** 是否必填 */
|
||||
required: boolean;
|
||||
/** 排序 */
|
||||
sort?: number;
|
||||
/** 数据类型(string, number, date等) */
|
||||
dataType?: string;
|
||||
}
|
||||
|
||||
/** 更新导入字段定义参数 */
|
||||
export interface UpdateImportFieldDefDTO {
|
||||
/** 中文字段名,如 商品名称 */
|
||||
fieldLabel: string;
|
||||
/** 文件字段名,如 商品名称 */
|
||||
fileFieldName?: string;
|
||||
/** 是否必填 */
|
||||
required: boolean;
|
||||
/** 排序 */
|
||||
sort?: number;
|
||||
/** 数据类型(string, number, date等) */
|
||||
dataType?: string;
|
||||
}
|
||||
|
||||
/** 导入字段定义过滤条件 */
|
||||
export interface ImportFieldDefFilterDTO {
|
||||
/** 导入类型(product-商品 order-订单) */
|
||||
type?: string;
|
||||
/** 字段名(模糊查询) */
|
||||
fieldName?: string;
|
||||
/** 字段标签(模糊查询) */
|
||||
fieldLabel?: string;
|
||||
}
|
||||
|
||||
/** 批量导入字段定义排序参数 */
|
||||
export interface BatchSortImportFieldDefDTO {
|
||||
/** 排序项列表 */
|
||||
sortItems: FieldDefSortItem[];
|
||||
}
|
||||
|
||||
/** 字段定义排序项 */
|
||||
export interface FieldDefSortItem {
|
||||
/** 字段定义ID */
|
||||
fieldDefId: number;
|
||||
/** 排序值 */
|
||||
sort: number;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* 导入字段定义模块VO类型定义
|
||||
*/
|
||||
|
||||
export namespace ImportFieldDefVO {
|
||||
/** 导入字段定义信息 */
|
||||
export interface ImportFieldDefInfoVO {
|
||||
/** 字段定义ID */
|
||||
id: number;
|
||||
/** 导入类型(product-商品 order-订单) */
|
||||
type: string;
|
||||
/** 数据库字段名,如 name */
|
||||
fieldName: string;
|
||||
/** 中文字段名,如 商品名称 */
|
||||
fieldLabel: string;
|
||||
/** 文件字段名,如 商品名称 */
|
||||
fileFieldName?: string;
|
||||
/** 是否必填 */
|
||||
required: boolean;
|
||||
/** 排序 */
|
||||
sort?: number;
|
||||
/** 数据类型(string, number, date等) */
|
||||
dataType?: string;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
updatedAt: string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user