proceeds-api.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "ykCenter养康中心管理系统 - 收款管理API",
  5. "description": "收款管理模块API接口文档,包含增删改查等核心功能接口,支持长者收款记录的全面管理",
  6. "version": "1.0.0",
  7. "contact": {
  8. "name": "技术支持",
  9. "email": "support@example.com"
  10. }
  11. },
  12. "servers": [
  13. {
  14. "url": "http://localhost:8080",
  15. "description": "开发环境服务器"
  16. },
  17. {
  18. "url": "https://api.ykcenter.com",
  19. "description": "生产环境服务器"
  20. }
  21. ],
  22. "tags": [
  23. {
  24. "name": "proceeds",
  25. "description": "收款管理相关接口"
  26. }
  27. ],
  28. "paths": {
  29. "/ykCenter/proceeds/list": {
  30. "get": {
  31. "tags": ["proceeds"],
  32. "summary": "获取收款记录列表",
  33. "description": "分页获取收款记录列表,支持按长者姓名、日期范围等条件筛选",
  34. "operationId": "getProceedsList",
  35. "parameters": [
  36. {
  37. "name": "pageNo",
  38. "in": "query",
  39. "description": "页码",
  40. "required": false,
  41. "schema": {
  42. "type": "integer",
  43. "default": 1,
  44. "minimum": 1
  45. }
  46. },
  47. {
  48. "name": "pageSize",
  49. "in": "query",
  50. "description": "每页数量",
  51. "required": false,
  52. "schema": {
  53. "type": "integer",
  54. "default": 10,
  55. "minimum": 1,
  56. "maximum": 100
  57. }
  58. },
  59. {
  60. "name": "elderlyName",
  61. "in": "query",
  62. "description": "长者姓名",
  63. "required": false,
  64. "schema": {
  65. "type": "string",
  66. "maxLength": 50
  67. }
  68. },
  69. {
  70. "name": "dateRange",
  71. "in": "query",
  72. "description": "日期范围,格式:YYYY-MM-DD,YYYY-MM-DD",
  73. "required": false,
  74. "schema": {
  75. "type": "array",
  76. "items": {
  77. "type": "string",
  78. "format": "date"
  79. },
  80. "maxItems": 2,
  81. "minItems": 2
  82. }
  83. }
  84. ],
  85. "responses": {
  86. "200": {
  87. "description": "获取成功",
  88. "content": {
  89. "application/json": {
  90. "schema": {
  91. "allOf": [
  92. {
  93. "$ref": "#/components/schemas/ApiResponse"
  94. },
  95. {
  96. "type": "object",
  97. "properties": {
  98. "data": {
  99. "$ref": "#/components/schemas/ProceedsListResponse"
  100. }
  101. }
  102. }
  103. ]
  104. }
  105. }
  106. }
  107. }
  108. }
  109. }
  110. },
  111. "/ykCenter/proceeds/add": {
  112. "post": {
  113. "tags": ["proceeds"],
  114. "summary": "新增收款记录",
  115. "description": "新增长者收款记录信息",
  116. "operationId": "addProceeds",
  117. "requestBody": {
  118. "required": true,
  119. "content": {
  120. "application/json": {
  121. "schema": {
  122. "$ref": "#/components/schemas/AddProceedsRequest"
  123. }
  124. }
  125. }
  126. },
  127. "responses": {
  128. "200": {
  129. "description": "新增成功",
  130. "content": {
  131. "application/json": {
  132. "schema": {
  133. "$ref": "#/components/schemas/ApiResponse"
  134. }
  135. }
  136. }
  137. }
  138. }
  139. }
  140. },
  141. "/ykCenter/proceeds/update": {
  142. "put": {
  143. "tags": ["proceeds"],
  144. "summary": "编辑收款记录",
  145. "description": "更新收款记录信息",
  146. "operationId": "updateProceeds",
  147. "requestBody": {
  148. "required": true,
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "$ref": "#/components/schemas/UpdateProceedsRequest"
  153. }
  154. }
  155. }
  156. },
  157. "responses": {
  158. "200": {
  159. "description": "更新成功",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "$ref": "#/components/schemas/ApiResponse"
  164. }
  165. }
  166. }
  167. }
  168. }
  169. }
  170. },
  171. "/ykCenter/proceeds/delete": {
  172. "delete": {
  173. "tags": ["proceeds"],
  174. "summary": "删除收款记录",
  175. "description": "根据ID删除收款记录信息",
  176. "operationId": "deleteProceeds",
  177. "parameters": [
  178. {
  179. "name": "id",
  180. "in": "query",
  181. "description": "收款记录ID",
  182. "required": true,
  183. "schema": {
  184. "type": "integer",
  185. "minimum": 1
  186. }
  187. }
  188. ],
  189. "responses": {
  190. "200": {
  191. "description": "删除成功",
  192. "content": {
  193. "application/json": {
  194. "schema": {
  195. "$ref": "#/components/schemas/ApiResponse"
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. },
  203. "/ykCenter/proceeds/upload": {
  204. "post": {
  205. "tags": ["proceeds"],
  206. "summary": "上传收款记录",
  207. "description": "上传收款记录信息,支持文件和表单数据,包含所有字段和图片上传",
  208. "operationId": "uploadProceeds",
  209. "requestBody": {
  210. "required": true,
  211. "content": {
  212. "multipart/form-data": {
  213. "schema": {
  214. "$ref": "#/components/schemas/UploadProceedsRequest"
  215. }
  216. }
  217. }
  218. },
  219. "responses": {
  220. "200": {
  221. "description": "上传成功",
  222. "content": {
  223. "application/json": {
  224. "schema": {
  225. "$ref": "#/components/schemas/ApiResponse"
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. },
  233. "/ykCenter/proceeds/image/{id}": {
  234. "get": {
  235. "tags": ["proceeds"],
  236. "summary": "获取收款凭证图片",
  237. "description": "根据收款记录ID获取收款凭证图片URL",
  238. "operationId": "getProceedsImage",
  239. "parameters": [
  240. {
  241. "name": "id",
  242. "in": "path",
  243. "description": "收款记录ID",
  244. "required": true,
  245. "schema": {
  246. "type": "integer",
  247. "minimum": 1
  248. }
  249. }
  250. ],
  251. "responses": {
  252. "200": {
  253. "description": "获取成功",
  254. "content": {
  255. "application/json": {
  256. "schema": {
  257. "allOf": [
  258. {
  259. "$ref": "#/components/schemas/ApiResponse"
  260. },
  261. {
  262. "type": "object",
  263. "properties": {
  264. "data": {
  265. "type": "object",
  266. "properties": {
  267. "imageUrl": {
  268. "type": "string",
  269. "description": "收款凭证图片URL"
  270. }
  271. }
  272. }
  273. }
  274. }
  275. ]
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. }
  283. },
  284. "components": {
  285. "schemas": {
  286. "ApiResponse": {
  287. "type": "object",
  288. "properties": {
  289. "code": {
  290. "type": "integer",
  291. "description": "响应码",
  292. "example": 200
  293. },
  294. "message": {
  295. "type": "string",
  296. "description": "响应消息",
  297. "example": "操作成功"
  298. },
  299. "data": {
  300. "type": "object",
  301. "description": "响应数据"
  302. }
  303. },
  304. "required": ["code", "message"]
  305. },
  306. "Proceeds": {
  307. "type": "object",
  308. "properties": {
  309. "id": {
  310. "type": "integer",
  311. "description": "收款记录ID",
  312. "example": 1,
  313. "minimum": 1
  314. },
  315. "elderlyName": {
  316. "type": "string",
  317. "description": "长者姓名",
  318. "example": "李老太太",
  319. "maxLength": 50
  320. },
  321. "amount": {
  322. "type": "string",
  323. "description": "收款金额",
  324. "example": "300.00",
  325. "pattern": "^\\d+(\\.\\d{1,2})?$"
  326. },
  327. "paymentType": {
  328. "type": "string",
  329. "description": "收款类型",
  330. "example": "微信",
  331. "enum": ["微信", "现金", "银行卡"]
  332. },
  333. "paymentDateTime": {
  334. "type": "string",
  335. "description": "收款日期时间",
  336. "example": "2023-06-15 10:15:00",
  337. "format": "date-time"
  338. },
  339. "operator": {
  340. "type": "string",
  341. "description": "操作员",
  342. "example": "王管理员",
  343. "maxLength": 50
  344. },
  345. "remark": {
  346. "type": "string",
  347. "description": "备注",
  348. "example": "充值餐费",
  349. "maxLength": 500
  350. },
  351. "receiptImage": {
  352. "type": "string",
  353. "description": "收款凭证图片URL",
  354. "example": "https://picsum.photos/seed/payment2/800/600.jpg"
  355. }
  356. },
  357. "required": ["elderlyName", "amount", "paymentType", "paymentDateTime", "operator"]
  358. },
  359. "ProceedsListResponse": {
  360. "type": "object",
  361. "properties": {
  362. "list": {
  363. "type": "array",
  364. "description": "收款记录列表",
  365. "items": {
  366. "$ref": "#/components/schemas/Proceeds"
  367. }
  368. },
  369. "total": {
  370. "type": "integer",
  371. "description": "总记录数",
  372. "example": 100,
  373. "minimum": 0
  374. }
  375. },
  376. "required": ["list", "total"]
  377. },
  378. "AddProceedsRequest": {
  379. "type": "object",
  380. "properties": {
  381. "elderlyName": {
  382. "type": "string",
  383. "description": "长者姓名",
  384. "example": "李老太太",
  385. "maxLength": 50
  386. },
  387. "amount": {
  388. "type": "string",
  389. "description": "收款金额",
  390. "example": "300.00",
  391. "pattern": "^\\d+(\\.\\d{1,2})?$"
  392. },
  393. "paymentType": {
  394. "type": "string",
  395. "description": "收款类型",
  396. "example": "微信",
  397. "enum": ["微信", "现金", "银行卡"]
  398. },
  399. "paymentDateTime": {
  400. "type": "string",
  401. "description": "收款日期时间",
  402. "example": "2023-06-15 10:15:00",
  403. "format": "date-time"
  404. },
  405. "operator": {
  406. "type": "string",
  407. "description": "操作员",
  408. "example": "王管理员",
  409. "maxLength": 50
  410. },
  411. "remark": {
  412. "type": "string",
  413. "description": "备注",
  414. "example": "充值餐费",
  415. "maxLength": 500
  416. },
  417. "receiptImage": {
  418. "type": "string",
  419. "description": "收款凭证图片URL",
  420. "example": "https://picsum.photos/seed/payment2/800/600.jpg"
  421. }
  422. },
  423. "required": ["elderlyName", "amount", "paymentType", "paymentDateTime", "operator"]
  424. },
  425. "UpdateProceedsRequest": {
  426. "allOf": [
  427. {
  428. "$ref": "#/components/schemas/AddProceedsRequest"
  429. },
  430. {
  431. "type": "object",
  432. "properties": {
  433. "id": {
  434. "type": "integer",
  435. "description": "收款记录ID",
  436. "example": 1,
  437. "minimum": 1
  438. }
  439. },
  440. "required": ["id"]
  441. }
  442. ]
  443. },
  444. "UploadProceedsRequest": {
  445. "type": "object",
  446. "properties": {
  447. "elderlyName": {
  448. "type": "string",
  449. "description": "长者姓名",
  450. "example": "李老太太",
  451. "maxLength": 50
  452. },
  453. "amount": {
  454. "type": "string",
  455. "description": "收款金额",
  456. "example": "300.00",
  457. "pattern": "^\\d+(\\.\\d{1,2})?$"
  458. },
  459. "paymentType": {
  460. "type": "string",
  461. "description": "收款类型",
  462. "example": "微信",
  463. "enum": ["微信", "现金", "银行卡"]
  464. },
  465. "paymentDateTime": {
  466. "type": "string",
  467. "description": "收款日期时间",
  468. "example": "2023-06-15 10:15:00",
  469. "format": "date-time"
  470. },
  471. "operator": {
  472. "type": "string",
  473. "description": "操作员",
  474. "example": "王管理员",
  475. "maxLength": 50
  476. },
  477. "remark": {
  478. "type": "string",
  479. "description": "备注",
  480. "example": "充值餐费",
  481. "maxLength": 500
  482. },
  483. "receiptImage": {
  484. "type": "string",
  485. "description": "收款凭证图片URL",
  486. "example": "https://picsum.photos/seed/payment2/800/600.jpg"
  487. },
  488. "imageFile": {
  489. "type": "string",
  490. "format": "binary",
  491. "description": "收款凭证图片文件",
  492. "example": "receipt.jpg"
  493. }
  494. },
  495. "required": ["elderlyName", "amount", "paymentType", "paymentDateTime", "operator"]
  496. }
  497. }
  498. },
  499. "security": [
  500. {
  501. "bearerAuth": []
  502. }
  503. ]
  504. }