zhengyiming
5 天以前 24e5e65a571e13404daf5642497322ef0f8a9c87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* 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 || {}),
  });
}