zhengyiming
2025-08-06 cb795c5827f6e7c0e4d2c1358f27d0862f502b5b
src/services/api/role.ts
@@ -41,6 +41,21 @@
  });
}
/** 查询角色用户列表 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', {
@@ -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 || {}),
  });
}