From db78250da2399c3466b645a3580f659c4a801f00 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 26 Jul 2023 13:43:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/answerbi/index.ts | 6 - src/services/answerbi/postController.ts | 120 ------------------ src/services/answerbi/postFavourController.ts | 48 ------- src/services/answerbi/postThumbController.ts | 18 --- src/services/answerbi/typings.d.ts | 104 --------------- 5 files changed, 296 deletions(-) delete mode 100644 src/services/answerbi/postController.ts delete mode 100644 src/services/answerbi/postFavourController.ts delete mode 100644 src/services/answerbi/postThumbController.ts diff --git a/src/services/answerbi/index.ts b/src/services/answerbi/index.ts index b48b7ec..65c02ce 100644 --- a/src/services/answerbi/index.ts +++ b/src/services/answerbi/index.ts @@ -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, }; diff --git a/src/services/answerbi/postController.ts b/src/services/answerbi/postController.ts deleted file mode 100644 index 97012b1..0000000 --- a/src/services/answerbi/postController.ts +++ /dev/null @@ -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/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/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/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/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/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/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/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/post/update', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: body, - ...(options || {}), - }); -} diff --git a/src/services/answerbi/postFavourController.ts b/src/services/answerbi/postFavourController.ts deleted file mode 100644 index df6a686..0000000 --- a/src/services/answerbi/postFavourController.ts +++ /dev/null @@ -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/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/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/post_favour/my/list/page', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: body, - ...(options || {}), - }); -} diff --git a/src/services/answerbi/postThumbController.ts b/src/services/answerbi/postThumbController.ts deleted file mode 100644 index bf9509a..0000000 --- a/src/services/answerbi/postThumbController.ts +++ /dev/null @@ -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/post_thumb/', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: body, - ...(options || {}), - }); -} diff --git a/src/services/answerbi/typings.d.ts b/src/services/answerbi/typings.d.ts index e6a6868..33a0861 100644 --- a/src/services/answerbi/typings.d.ts +++ b/src/services/answerbi/typings.d.ts @@ -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;