UserController.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* eslint-disable */
  2. // 该文件由 OneAPI 自动生成,请勿手动修改!
  3. import { request } from '@umijs/max';
  4. /** 此处后端没有提供注释 GET /api/v1/queryUserList */
  5. export async function queryUserList(
  6. params: {
  7. // query
  8. /** keyword */
  9. keyword?: string;
  10. /** current */
  11. current?: number;
  12. /** pageSize */
  13. pageSize?: number;
  14. },
  15. options?: { [key: string]: any },
  16. ) {
  17. return request<API.Result_PageInfo_UserInfo__>('/api/v1/queryUserList', {
  18. method: 'GET',
  19. params: {
  20. ...params,
  21. },
  22. ...(options || {}),
  23. });
  24. }
  25. /** 此处后端没有提供注释 POST /api/v1/user */
  26. export async function addUser(body?: API.UserInfoVO, options?: { [key: string]: any }) {
  27. return request<API.Result_UserInfo_>('/api/v1/user', {
  28. method: 'POST',
  29. headers: {
  30. 'Content-Type': 'application/json',
  31. },
  32. data: body,
  33. ...(options || {}),
  34. });
  35. }
  36. /** 此处后端没有提供注释 GET /api/v1/user/${param0} */
  37. export async function getUserDetail(
  38. params: {
  39. // path
  40. /** userId */
  41. userId?: string;
  42. },
  43. options?: { [key: string]: any },
  44. ) {
  45. const { userId: param0 } = params;
  46. return request<API.Result_UserInfo_>(`/api/v1/user/${param0}`, {
  47. method: 'GET',
  48. params: { ...params },
  49. ...(options || {}),
  50. });
  51. }
  52. /** 此处后端没有提供注释 PUT /api/v1/user/${param0} */
  53. export async function modifyUser(
  54. params: {
  55. // path
  56. /** userId */
  57. userId?: string;
  58. },
  59. body?: API.UserInfoVO,
  60. options?: { [key: string]: any },
  61. ) {
  62. const { userId: param0 } = params;
  63. return request<API.Result_UserInfo_>(`/api/v1/user/${param0}`, {
  64. method: 'PUT',
  65. headers: {
  66. 'Content-Type': 'application/json',
  67. },
  68. params: { ...params },
  69. data: body,
  70. ...(options || {}),
  71. });
  72. }
  73. /** 此处后端没有提供注释 DELETE /api/v1/user/${param0} */
  74. export async function deleteUser(
  75. params: {
  76. // path
  77. /** userId */
  78. userId?: string;
  79. },
  80. options?: { [key: string]: any },
  81. ) {
  82. const { userId: param0 } = params;
  83. return request<API.Result_string_>(`/api/v1/user/${param0}`, {
  84. method: 'DELETE',
  85. params: { ...params },
  86. ...(options || {}),
  87. });
  88. }