121 lines
2.9 KiB
TypeScript
121 lines
2.9 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from '@umijs/max';
|
|
|
|
/** addPost POST /api/post/add */
|
|
export async function addPostUsingPOST(body: API.PostAddRequest, options?: { [key: string]: any }) {
|
|
return request<API.CommonResponseLong_>('/api/post/add', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** deletePost POST /api/post/delete */
|
|
export async function deletePostUsingPOST(
|
|
body: API.DeleteRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/post/delete', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** editPost POST /api/post/edit */
|
|
export async function editPostUsingPOST(
|
|
body: API.PostEditRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/post/edit', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** getPostVOById GET /api/post/get/vo */
|
|
export async function getPostVOByIdUsingGET(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.getPostVOByIdUsingGETParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePostVO_>('/api/post/get/vo', {
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** listPostVOByPage POST /api/post/list/page/vo */
|
|
export async function listPostVOByPageUsingPOST(
|
|
body: API.PostQueryRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePagePostVO_>('/api/post/list/page/vo', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** listMyPostVOByPage POST /api/post/my/list/page/vo */
|
|
export async function listMyPostVOByPageUsingPOST(
|
|
body: API.PostQueryRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePagePostVO_>('/api/post/my/list/page/vo', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** searchPostVOByPage POST /api/post/search/page/vo */
|
|
export async function searchPostVOByPageUsingPOST(
|
|
body: API.PostQueryRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePagePostVO_>('/api/post/search/page/vo', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** updatePost POST /api/post/update */
|
|
export async function updatePostUsingPOST(
|
|
body: API.PostUpdateRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/post/update', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|