/* eslint-disable */
|
// @ts-ignore
|
import { request } from '@/utils/request';
|
|
/** 删除角色 DELETE /api/user/role/deleteRole */
|
export async function deleteRole(body: API.DeleteRoleCommand, options?: API.RequestConfig) {
|
return request<number>('/api/user/role/deleteRole', {
|
method: 'DELETE',
|
headers: {
|
'Content-Type': 'application/json-patch+json',
|
},
|
data: body,
|
...(options || {}),
|
});
|
}
|
|
/** 查询角色详情 GET /api/user/role/getRole */
|
export async function getRole(
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
params: API.APIgetRoleParams,
|
options?: API.RequestConfig
|
) {
|
return request<API.GetRoleQueryResult>('/api/user/role/getRole', {
|
method: 'GET',
|
params: {
|
...params,
|
},
|
...(options || {}),
|
});
|
}
|
|
/** 查询角色分页列表 POST /api/user/role/getRoles */
|
export async function getRoles(body: API.GetRolesQuery, options?: API.RequestConfig) {
|
return request<API.PagedListQueryResultGetRolesQueryResultItem>('/api/user/role/getRoles', {
|
method: 'POST',
|
headers: {
|
'Content-Type': 'application/json-patch+json',
|
},
|
data: body,
|
...(options || {}),
|
});
|
}
|
|
/** 查询角色用户列表 GET /api/user/role/getRoleUserInfos */
|
export async function getRoleUserInfos(
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
params: API.APIgetRoleUserInfosParams,
|
options?: API.RequestConfig
|
) {
|
return request<API.GetRoleUserInfosQueryResultItem[]>('/api/user/role/getRoleUserInfos', {
|
method: 'GET',
|
params: {
|
...params,
|
},
|
...(options || {}),
|
});
|
}
|
|
/** 保存角色 POST /api/user/role/saveRole */
|
export async function saveRole(body: API.SaveRoleCommand, options?: API.RequestConfig) {
|
return request<string>('/api/user/role/saveRole', {
|
method: 'POST',
|
headers: {
|
'Content-Type': 'application/json-patch+json',
|
},
|
data: body,
|
...(options || {}),
|
});
|
}
|
|
/** 设置角色是否禁用 PUT /api/user/role/setRoleIsDisabled */
|
export async function setRoleIsDisabled(
|
body: API.SetRoleIsDisabledCommand,
|
options?: API.RequestConfig
|
) {
|
return request<number>('/api/user/role/setRoleIsDisabled', {
|
method: 'PUT',
|
headers: {
|
'Content-Type': 'application/json-patch+json',
|
},
|
data: body,
|
...(options || {}),
|
});
|
}
|
|
/** 设置角色用户 PUT /api/user/role/setRoleUserInfos */
|
export async function setRoleUserInfos(
|
body: API.SetRoleUserInfosCommand,
|
options?: API.RequestConfig
|
) {
|
return request<number>('/api/user/role/setRoleUserInfos', {
|
method: 'PUT',
|
headers: {
|
'Content-Type': 'application/json-patch+json',
|
},
|
data: body,
|
...(options || {}),
|
});
|
}
|