zksu
/
WEB
forked from yoone/WEB
1
0
Fork 0
WEB/src/servers/api/category.ts

124 lines
3.5 KiB
TypeScript

// @ts-ignore
/* eslint-disable */
import { request } from 'umi';
/** 此处后端没有提供注释 GET /category/ */
export async function categorycontrollerGetlist(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.categorycontrollerGetlistParams,
options?: { [key: string]: any },
) {
return request<any>('/category/', {
method: 'GET',
params: {
...params,
pageSize: undefined,
...params['pageSize'],
current: undefined,
...params['current'],
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /category/ */
export async function categorycontrollerCreate(
body: API.CreateCategoryDTO,
options?: { [key: string]: any },
) {
return request<any>('/category/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 PUT /category/${param0} */
export async function categorycontrollerUpdate(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.categorycontrollerUpdateParams,
body: API.UpdateCategoryDTO,
options?: { [key: string]: any },
) {
const { id: param0, ...queryParams } = params;
return request<any>(`/category/${param0}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
params: { ...queryParams },
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 DELETE /category/${param0} */
export async function categorycontrollerDelete(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.categorycontrollerDeleteParams,
options?: { [key: string]: any },
) {
const { id: param0, ...queryParams } = params;
return request<any>(`/category/${param0}`, {
method: 'DELETE',
params: { ...queryParams },
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /category/all */
export async function categorycontrollerGetall(options?: {
[key: string]: any;
}) {
return request<any>('/category/all', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /category/attribute */
export async function categorycontrollerCreatecategoryattribute(
body: Record<string, any>,
options?: { [key: string]: any },
) {
return request<any>('/category/attribute', {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /category/attribute/${param0} */
export async function categorycontrollerGetcategoryattributes(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.categorycontrollerGetcategoryattributesParams,
options?: { [key: string]: any },
) {
const { categoryId: param0, ...queryParams } = params;
return request<any>(`/category/attribute/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}
/** 此处后端没有提供注释 DELETE /category/attribute/${param0} */
export async function categorycontrollerDeletecategoryattribute(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.categorycontrollerDeletecategoryattributeParams,
options?: { [key: string]: any },
) {
const { id: param0, ...queryParams } = params;
return request<any>(`/category/attribute/${param0}`, {
method: 'DELETE',
params: { ...queryParams },
...(options || {}),
});
}