wupengfei
9 天以前 61c935836c947aaf3421731045d024d064cc6688
src/services/api/role.ts
@@ -2,7 +2,7 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 此处后端没有提供注释 DELETE /api/user/role/deleteRole */
/** 删除角色 DELETE /api/user/role/deleteRole */
export async function deleteRole(body: API.DeleteRoleCommand, options?: API.RequestConfig) {
  return request<number>('/api/user/role/deleteRole', {
    method: 'DELETE',
@@ -14,7 +14,7 @@
  });
}
/** 此处后端没有提供注释 GET /api/user/role/getRole */
/** 查询角色详情 GET /api/user/role/getRole */
export async function getRole(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetRoleParams,
@@ -29,7 +29,7 @@
  });
}
/** 此处后端没有提供注释 POST /api/user/role/getRoles */
/** 查询角色分页列表 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',
@@ -41,7 +41,22 @@
  });
}
/** 此处后端没有提供注释 POST /api/user/role/saveRole */
/** 查询角色用户列表 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',
@@ -52,3 +67,33 @@
    ...(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 || {}),
  });
}