mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 07:49:20 +08:00
wip: 数据导入
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
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/list-by-type/all/${type}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询导入字段定义
|
||||
*/
|
||||
export async function getImportFieldDefPageApi(
|
||||
params: PageQueryDTO<ImportFieldDefDTO.ImportFieldDefFilterDTO>,
|
||||
) {
|
||||
return requestClient.post<
|
||||
PageResultVO<ImportFieldDefVO.ImportFieldDefInfoVO>
|
||||
>('/ec/import-field-def/page', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量排序导入字段定义
|
||||
*/
|
||||
export async function batchSortImportFieldDefApi(
|
||||
data: ImportFieldDefDTO.BatchSortImportFieldDefDTO,
|
||||
) {
|
||||
return requestClient.post('/ec/import-field-def/batch-sort', data);
|
||||
}
|
||||
Reference in New Issue
Block a user