218 lines
5.7 KiB
TypeScript
218 lines
5.7 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from 'umi';
|
|
|
|
/** 此处后端没有提供注释 POST /dict/ */
|
|
export async function dictcontrollerCreatedict(
|
|
body: API.CreateDictDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/dict/', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /dict/${param0} */
|
|
export async function dictcontrollerGetdict(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerGetdictParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/dict/${param0}`, {
|
|
method: 'GET',
|
|
params: { ...queryParams },
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /dict/${param0} */
|
|
export async function dictcontrollerUpdatedict(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerUpdatedictParams,
|
|
body: API.UpdateDictDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/dict/${param0}`, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 DELETE /dict/${param0} */
|
|
export async function dictcontrollerDeletedict(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerDeletedictParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/dict/${param0}`, {
|
|
method: 'DELETE',
|
|
params: { ...queryParams },
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /dict/import */
|
|
export async function dictcontrollerImportdicts(
|
|
body: {},
|
|
files?: File[],
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const formData = new FormData();
|
|
|
|
if (files) {
|
|
files.forEach((f) => formData.append('files', f || ''));
|
|
}
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
const item = (body as any)[ele];
|
|
|
|
if (item !== undefined && item !== null) {
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
if (item instanceof Array) {
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
} else {
|
|
formData.append(
|
|
ele,
|
|
new Blob([JSON.stringify(item)], { type: 'application/json' }),
|
|
);
|
|
}
|
|
} else {
|
|
formData.append(ele, item);
|
|
}
|
|
}
|
|
});
|
|
|
|
return request<any>('/dict/import', {
|
|
method: 'POST',
|
|
data: formData,
|
|
requestType: 'form',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /dict/item */
|
|
export async function dictcontrollerCreatedictitem(
|
|
body: API.CreateDictItemDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/dict/item', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /dict/item/${param0} */
|
|
export async function dictcontrollerUpdatedictitem(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerUpdatedictitemParams,
|
|
body: API.UpdateDictItemDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/dict/item/${param0}`, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 DELETE /dict/item/${param0} */
|
|
export async function dictcontrollerDeletedictitem(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerDeletedictitemParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/dict/item/${param0}`, {
|
|
method: 'DELETE',
|
|
params: { ...queryParams },
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /dict/item/import */
|
|
export async function dictcontrollerImportdictitems(
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/dict/item/import', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /dict/item/template */
|
|
export async function dictcontrollerDownloaddictitemtemplate(options?: {
|
|
[key: string]: any;
|
|
}) {
|
|
return request<any>('/dict/item/template', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /dict/items */
|
|
export async function dictcontrollerGetdictitems(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerGetdictitemsParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/dict/items', {
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /dict/list */
|
|
export async function dictcontrollerGetdicts(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.dictcontrollerGetdictsParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/dict/list', {
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /dict/template */
|
|
export async function dictcontrollerDownloaddicttemplate(options?: {
|
|
[key: string]: any;
|
|
}) {
|
|
return request<any>('/dict/template', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|