删除不必要的代码

This commit is contained in:
brian 2023-07-26 13:43:59 +08:00
parent 5377edbc09
commit db78250da2
5 changed files with 0 additions and 296 deletions

View File

@ -4,15 +4,9 @@
// API 唯一标识:
import * as chartController from './chartController';
import * as fileController from './fileController';
import * as postController from './postController';
import * as postFavourController from './postFavourController';
import * as postThumbController from './postThumbController';
import * as userController from './userController';
export default {
chartController,
fileController,
postController,
postFavourController,
postThumbController,
userController,
};

View File

@ -1,120 +0,0 @@
// @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 || {}),
});
}

View File

@ -1,48 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** doPostFavour POST /api/post_favour/ */
export async function doPostFavourUsingPOST(
body: API.PostFavourAddRequest,
options?: { [key: string]: any },
) {
return request<API.CommonResponseInt_>('/api/post_favour/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** listFavourPostByPage POST /api/post_favour/list/page */
export async function listFavourPostByPageUsingPOST(
body: API.PostFavourQueryRequest,
options?: { [key: string]: any },
) {
return request<API.CommonResponsePagePostVO_>('/api/post_favour/list/page', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** listMyFavourPostByPage POST /api/post_favour/my/list/page */
export async function listMyFavourPostByPageUsingPOST(
body: API.PostQueryRequest,
options?: { [key: string]: any },
) {
return request<API.CommonResponsePagePostVO_>('/api/post_favour/my/list/page', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

View File

@ -1,18 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** doThumb POST /api/post_thumb/ */
export async function doThumbUsingPOST(
body: API.PostThumbAddRequest,
options?: { [key: string]: any },
) {
return request<API.CommonResponseInt_>('/api/post_thumb/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

View File

@ -79,12 +79,6 @@ declare namespace API {
message?: string;
};
type CommonResponseInt_ = {
code?: number;
data?: number;
message?: string;
};
type CommonResponseLoginUserVO_ = {
code?: number;
data?: LoginUserVO;
@ -103,12 +97,6 @@ declare namespace API {
message?: string;
};
type CommonResponsePagePostVO_ = {
code?: number;
data?: PagePostVO_;
message?: string;
};
type CommonResponsePageUser_ = {
code?: number;
data?: PageUser_;
@ -121,12 +109,6 @@ declare namespace API {
message?: string;
};
type CommonResponsePostVO_ = {
code?: number;
data?: PostVO;
message?: string;
};
type CommonResponseString_ = {
code?: number;
data?: string;
@ -172,11 +154,6 @@ declare namespace API {
id?: number;
};
type getPostVOByIdUsingGETParams = {
/** id */
id?: number;
};
type getUserByIdUsingGETParams = {
/** id */
id?: number;
@ -215,19 +192,6 @@ declare namespace API {
total?: number;
};
type PagePostVO_ = {
countId?: string;
current?: number;
maxLimit?: number;
optimizeCountSql?: boolean;
orders?: OrderItem[];
pages?: number;
records?: PostVO[];
searchCount?: boolean;
size?: number;
total?: number;
};
type PageUser_ = {
countId?: string;
current?: number;
@ -254,74 +218,6 @@ declare namespace API {
total?: number;
};
type PostAddRequest = {
content?: string;
tags?: string[];
title?: string;
};
type PostEditRequest = {
content?: string;
id?: number;
tags?: string[];
title?: string;
};
type PostFavourAddRequest = {
postId?: number;
};
type PostFavourQueryRequest = {
current?: number;
pageSize?: number;
postQueryRequest?: PostQueryRequest;
sortField?: string;
sortOrder?: string;
userId?: number;
};
type PostQueryRequest = {
content?: string;
current?: number;
favourUserId?: number;
id?: number;
notId?: number;
orTags?: string[];
pageSize?: number;
searchText?: string;
sortField?: string;
sortOrder?: string;
tags?: string[];
title?: string;
userId?: number;
};
type PostThumbAddRequest = {
postId?: number;
};
type PostUpdateRequest = {
content?: string;
id?: number;
tags?: string[];
title?: string;
};
type PostVO = {
content?: string;
createTime?: string;
favourNum?: number;
hasFavour?: boolean;
hasThumb?: boolean;
id?: number;
tagList?: string[];
thumbNum?: number;
title?: string;
updateTime?: string;
user?: UserVO;
userId?: number;
};
type regenChartByAiAsyncMqUsingPOSTParams = {
/** chartId */
chartId?: number;