long-picture-frontend/src/api/userController.ts

137 lines
3.3 KiB
TypeScript

// @ts-ignore
/* eslint-disable */
import request from '@/request'
/** addUser POST /api/user/add */
export async function addUserUsingPost(body: API.UserAddRequest, options?: { [key: string]: any }) {
return request<API.RLong_>('/api/user/add', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}
/** deleteUser POST /api/user/delete */
export async function deleteUserUsingPost(
body: API.DeleteRequest,
options?: { [key: string]: any }
) {
return request<API.RBoolean_>('/api/user/delete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}
/** getUserById GET /api/user/get */
export async function getUserByIdUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getUserByIdUsingGETParams,
options?: { [key: string]: any }
) {
return request<API.RUser_>('/api/user/get', {
method: 'GET',
params: {
...params,
},
...(options || {}),
})
}
/** getLoginUser GET /api/user/get/login */
export async function getLoginUserUsingGet(options?: { [key: string]: any }) {
return request<API.RLoginUserVO_>('/api/user/get/login', {
method: 'GET',
...(options || {}),
})
}
/** getUserVoById GET /api/user/get/vo */
export async function getUserVoByIdUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getUserVoByIdUsingGETParams,
options?: { [key: string]: any }
) {
return request<API.RUserVO_>('/api/user/get/vo', {
method: 'GET',
params: {
...params,
},
...(options || {}),
})
}
/** listUserVOByPage POST /api/user/list/page/vo */
export async function listUserVoByPageUsingPost(
body: API.UserQueryRequest,
options?: { [key: string]: any }
) {
return request<API.RPageUserVO_>('/api/user/list/page/vo', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}
/** userLogin POST /api/user/login */
export async function userLoginUsingPost(
body: API.UserLoginRequest,
options?: { [key: string]: any }
) {
return request<API.RLoginUserVO_>('/api/user/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}
/** userLogout POST /api/user/logout */
export async function userLogoutUsingPost(options?: { [key: string]: any }) {
return request<API.RBoolean_>('/api/user/logout', {
method: 'POST',
...(options || {}),
})
}
/** userRegister POST /api/user/register */
export async function userRegisterUsingPost(
body: API.UserRegisterRequest,
options?: { [key: string]: any }
) {
return request<API.RLong_>('/api/user/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}
/** updateUser POST /api/user/update */
export async function updateUserUsingPost(
body: API.UserUpdateRequest,
options?: { [key: string]: any }
) {
return request<API.RBoolean_>('/api/user/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
})
}