Notice.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /* eslint-disable */
  2. /* tslint:disable */
  3. /*
  4. * ---------------------------------------------------------------
  5. * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
  6. * ## ##
  7. * ## AUTHOR: acacode ##
  8. * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
  9. * ---------------------------------------------------------------
  10. */
  11. import { AxiosResponse } from 'axios'
  12. import {
  13. ResultOutputInt64,
  14. ResultOutputPageOutputNoticeGetPageOutput,
  15. ResultOutputNoticeGetOutput,
  16. NoticeAddInput,
  17. NoticeUpdateInput,
  18. PageInputNoticeGetPageDto,
  19. } from './data-contracts'
  20. import { ContentType, HttpClient, RequestParams } from './http-client'
  21. export class NoticeApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  22. /**
  23. * No description
  24. *
  25. * @tags notice
  26. * @name Get
  27. * @summary 查询公告
  28. * @request GET:/api/admin/notice/get
  29. * @secure
  30. */
  31. get = (
  32. query?: {
  33. /** @format int64 */
  34. id?: number
  35. },
  36. params: RequestParams = {}
  37. ) =>
  38. this.request<ResultOutputNoticeGetOutput, any>({
  39. path: `/api/admin/notice/get`,
  40. method: 'GET',
  41. query: query,
  42. secure: true,
  43. format: 'json',
  44. ...params,
  45. })
  46. /**
  47. * No description
  48. *
  49. * @tags notice
  50. * @name GetPage
  51. * @summary 查询分页
  52. * @request POST:/api/admin/notice/get-page
  53. * @secure
  54. */
  55. getPage = (data: PageInputNoticeGetPageDto, params: RequestParams = {}) =>
  56. this.request<ResultOutputPageOutputNoticeGetPageOutput, any>({
  57. path: `/api/admin/notice/get-page`,
  58. method: 'POST',
  59. body: data,
  60. secure: true,
  61. type: ContentType.Json,
  62. format: 'json',
  63. ...params,
  64. })
  65. /**
  66. * No description
  67. *
  68. * @tags notice
  69. * @name Add
  70. * @summary 新增公告
  71. * @request POST:/api/admin/notice/add
  72. * @secure
  73. */
  74. add = (data: NoticeAddInput, params: RequestParams = {}) =>
  75. this.request<ResultOutputInt64, any>({
  76. path: `/api/admin/notice/add`,
  77. method: 'POST',
  78. body: data,
  79. secure: true,
  80. type: ContentType.Json,
  81. format: 'json',
  82. ...params,
  83. })
  84. /**
  85. * No description
  86. *
  87. * @tags notice
  88. * @name Update
  89. * @summary 修改公告
  90. * @request PUT:/api/admin/notice/update
  91. * @secure
  92. */
  93. update = (data: NoticeUpdateInput, params: RequestParams = {}) =>
  94. this.request<AxiosResponse, any>({
  95. path: `/api/admin/notice/update`,
  96. method: 'PUT',
  97. body: data,
  98. secure: true,
  99. type: ContentType.Json,
  100. ...params,
  101. })
  102. /**
  103. * No description
  104. *
  105. * @tags notice
  106. * @name SoftDelete
  107. * @summary 删除公告
  108. * @request DELETE:/api/admin/notice/soft-delete
  109. * @secure
  110. */
  111. softDelete = (
  112. query?: {
  113. /** @format int64 */
  114. id?: number
  115. },
  116. params: RequestParams = {}
  117. ) =>
  118. this.request<AxiosResponse, any>({
  119. path: `/api/admin/notice/soft-delete`,
  120. method: 'DELETE',
  121. query: query,
  122. secure: true,
  123. ...params,
  124. })
  125. /**
  126. * No description
  127. *
  128. * @tags notice
  129. * @name Get
  130. * @summary 查询重要公告
  131. * @request GET:/api/admin/notice/get-weight
  132. * @secure
  133. */
  134. getWeight = (
  135. query?: {
  136. },
  137. params: RequestParams = {}
  138. ) =>
  139. this.request<ResultOutputNoticeGetOutput, any>({
  140. path: `/api/admin/notice/get-weight`,
  141. method: 'GET',
  142. query: query,
  143. secure: true,
  144. format: 'json',
  145. ...params,
  146. })
  147. }