swagger.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. openapi: 3.0.0
  2. info:
  3. title: micro_learning
  4. description: CRM
  5. version: 0.0.1
  6. paths:
  7. /Test.Nullable:
  8. post:
  9. tags:
  10. - 测试
  11. operationId: Test.Nullable
  12. summary: 测试空值参数
  13. requestBody:
  14. required: true
  15. content:
  16. application/json:
  17. schema:
  18. oneOf:
  19. - $ref: '#/components/schemas/Nullable'
  20. examples:
  21. AllPass:
  22. $ref: '#/components/examples/NullableReqAllPass'
  23. responses:
  24. 200:
  25. description: 请求成功
  26. content:
  27. application/json:
  28. examples:
  29. success:
  30. $ref: "#/components/examples/success"
  31. /CtrContract.Get:
  32. post:
  33. tags:
  34. - 合同
  35. operationId: CtrContractGet
  36. summary: 合同详情
  37. requestBody:
  38. required: true
  39. content:
  40. application/json:
  41. schema:
  42. oneOf:
  43. - $ref: '#/components/schemas/IdReq'
  44. examples:
  45. IdReq:
  46. $ref: '#/components/examples/IdReq'
  47. responses:
  48. 200:
  49. description: 请求成功
  50. content:
  51. application/json:
  52. examples:
  53. success:
  54. $ref: "#/components/examples/success"
  55. /CtrContract.List:
  56. post:
  57. tags:
  58. - 合同
  59. operationId: CtrContractList
  60. summary: 查询合同
  61. requestBody:
  62. required: true
  63. content:
  64. application/json:
  65. schema:
  66. oneOf:
  67. - $ref: '#/components/schemas/CtrContractList'
  68. examples:
  69. CtrContractList:
  70. $ref: '#/components/examples/CtrContractList'
  71. responses:
  72. 200:
  73. description: 请求成功
  74. content:
  75. application/json:
  76. schema:
  77. oneOf:
  78. - $ref: '#/components/schemas/CtrContractListRsp'
  79. examples:
  80. success:
  81. $ref: "#/components/examples/success"
  82. /CtrContract.Add:
  83. post:
  84. tags:
  85. - 合同
  86. operationId: CtrContractAdd
  87. summary: 新增合同
  88. requestBody:
  89. required: true
  90. content:
  91. application/json:
  92. schema:
  93. oneOf:
  94. - $ref: '#/components/schemas/CtrContractAdd'
  95. examples:
  96. CtrContractAdd:
  97. $ref: '#/components/examples/CtrContractAdd'
  98. responses:
  99. 200:
  100. description: 请求成功
  101. content:
  102. application/json:
  103. examples:
  104. success:
  105. $ref: "#/components/examples/success"
  106. /CtrContract.Update:
  107. post:
  108. tags:
  109. - 合同
  110. operationId: CtrContractUpdate
  111. summary: 更新合同
  112. requestBody:
  113. required: true
  114. content:
  115. application/json:
  116. schema:
  117. oneOf:
  118. - $ref: '#/components/schemas/CtrContractUpdate'
  119. examples:
  120. CtrContractUpdate:
  121. $ref: '#/components/examples/CtrContractUpdate'
  122. responses:
  123. 200:
  124. description: 请求成功
  125. content:
  126. application/json:
  127. examples:
  128. success:
  129. $ref: "#/components/examples/success"
  130. /CtrContract.Transfer:
  131. post:
  132. tags:
  133. - 合同
  134. operationId: CtrContractTransfer
  135. summary: 转移合同
  136. requestBody:
  137. required: true
  138. content:
  139. application/json:
  140. schema:
  141. oneOf:
  142. - $ref: '#/components/schemas/CtrContractTransfer'
  143. examples:
  144. CtrContractTransfer:
  145. $ref: '#/components/examples/CtrContractTransfer'
  146. responses:
  147. 200:
  148. description: 请求成功
  149. content:
  150. application/json:
  151. examples:
  152. success:
  153. $ref: "#/components/examples/success"
  154. /CtrContract.Delete:
  155. post:
  156. tags:
  157. - 合同
  158. operationId: CtrContractDelete
  159. summary: 删除合同
  160. requestBody:
  161. required: true
  162. content:
  163. application/json:
  164. schema:
  165. oneOf:
  166. - $ref: '#/components/schemas/IdsReq'
  167. examples:
  168. IdsReq:
  169. $ref: '#/components/examples/IdsReq'
  170. responses:
  171. 200:
  172. description: 请求成功
  173. content:
  174. application/json:
  175. examples:
  176. success:
  177. $ref: "#/components/examples/success"
  178. # 添加这个 swagger ui 会显示授权按钮
  179. security:
  180. - bearerAuth: []
  181. components:
  182. securitySchemes:
  183. basicAuth:
  184. type: http
  185. scheme: basic
  186. bearerAuth:
  187. type: http
  188. scheme: bearer
  189. schemas:
  190. Nullable:
  191. type: object
  192. required:
  193. - Str
  194. - Int
  195. - Bool
  196. - Slice
  197. properties:
  198. Str:
  199. type: string
  200. description: 字符串参数
  201. Int:
  202. type: integer
  203. description: Int 参数
  204. Bool:
  205. type: boolean
  206. description: Bool 参数
  207. Slice:
  208. type: array
  209. description: Slice 参数
  210. items:
  211. type: integer
  212. NoArgs:
  213. type: object
  214. properties:
  215. noargs:
  216. type: string
  217. description: 无参数,但是 body 中必须传输一个 json 空对象 "{}"
  218. IdReq:
  219. type: object
  220. required:
  221. - id
  222. properties:
  223. id:
  224. type: integer
  225. description: ID
  226. IdsReq:
  227. type: object
  228. required:
  229. - id
  230. properties:
  231. id:
  232. type: array
  233. description: ID
  234. items:
  235. type: integer
  236. CtrContractList:
  237. type: object
  238. properties:
  239. beginTime:
  240. type: string
  241. description: 开始时间
  242. endTime:
  243. type: string
  244. description: 结束时间
  245. pageNum:
  246. type: integer
  247. description: 当前页码
  248. pageSize:
  249. type: integer
  250. description: 每页数
  251. orderBy:
  252. type: string
  253. description: 排序方式
  254. searchText:
  255. type: string
  256. description: 按合同编号,合同名称,客户名称,项目名称搜索
  257. contractCode:
  258. type: string
  259. description: 合同编号
  260. contractName:
  261. type: string
  262. description: 合同名称
  263. custId:
  264. type: integer
  265. description: 关联客户
  266. custName:
  267. type: string
  268. description: 客户名称
  269. nboId:
  270. type: integer
  271. description: 关联项目
  272. nboName:
  273. type: string
  274. description: 项目名称
  275. approStatus:
  276. type: string
  277. description: 审批状态
  278. contractType:
  279. type: string
  280. description: 合同类型
  281. contractAmount:
  282. type: number
  283. description: 合同金额
  284. invoiceAmount:
  285. type: number
  286. description: 已开票金额
  287. collectedAmount:
  288. type: number
  289. description: 已回款金额
  290. # contractStartTime:
  291. # type: string
  292. # description: 合同开始时间
  293. # contractEndTime:
  294. # type: string
  295. # description: 合同结束时间
  296. inchargeId:
  297. type: integer
  298. description: 负责人ID
  299. inchargeName:
  300. type: string
  301. description: 负责人
  302. signatoryId:
  303. type: integer
  304. description: 公司签约人ID
  305. signatoryName:
  306. type: string
  307. description: 公司签约人
  308. distributorId:
  309. type: integer
  310. description: 经销商ID
  311. distributorName:
  312. type: string
  313. description: 经销商
  314. CtrContractAdd:
  315. type: object
  316. required:
  317. properties:
  318. contractCode:
  319. type: string
  320. description: 合同编号
  321. contractName:
  322. type: string
  323. description: 合同名称
  324. # custId:
  325. # type: integer
  326. # description: 关联客户
  327. # custName:
  328. # type: string
  329. # description: 客户名称
  330. nboId:
  331. type: integer
  332. description: 关联项目
  333. # nboName:
  334. # type: string
  335. # description: 项目名称
  336. # approStatus:
  337. # type: string
  338. # description: 审批状态
  339. contractType:
  340. type: string
  341. description: 合同类型
  342. # contractAmount:
  343. # type: number
  344. # description: 合同金额
  345. # invoiceAmount:
  346. # type: number
  347. # description: 已开票金额
  348. # collectedAmount:
  349. # type: number
  350. # description: 已回款金额
  351. contractStartTime:
  352. type: string
  353. description: 合同开始时间
  354. contractEndTime:
  355. type: string
  356. description: 合同结束时间
  357. inchargeId:
  358. type: integer
  359. description: 负责人ID
  360. inchargeName:
  361. type: string
  362. description: 负责人
  363. signatoryId:
  364. type: integer
  365. description: 公司签约人ID
  366. signatoryName:
  367. type: string
  368. description: 公司签约人
  369. distributorId:
  370. type: integer
  371. description: 经销商ID
  372. distributorName:
  373. type: string
  374. description: 经销商
  375. remark:
  376. type: string
  377. description: 备注
  378. product:
  379. type: array
  380. description: 产品
  381. items:
  382. type: object
  383. properties:
  384. prodId:
  385. type: integer
  386. description: 关联产品
  387. prodNum:
  388. type: integer
  389. description: 产品数量
  390. maintTerm:
  391. type: integer
  392. description: 维保期
  393. sugSalesPrice:
  394. type: number
  395. description: 建议成交价
  396. tranPrice:
  397. type: number
  398. description: 成交价格
  399. remark:
  400. type: string
  401. description: 备注
  402. CtrContractUpdate:
  403. type: object
  404. required:
  405. - id
  406. properties:
  407. id:
  408. type: integer
  409. description: Id
  410. contractCode:
  411. type: string
  412. description: 合同编号
  413. contractName:
  414. type: string
  415. description: 合同名称
  416. # custId:
  417. # type: integer
  418. # description: 关联客户
  419. # custName:
  420. # type: string
  421. # description: 客户名称
  422. nboId:
  423. type: integer
  424. description: 关联项目
  425. # nboName:
  426. # type: string
  427. # description: 项目名称
  428. # approStatus:
  429. # type: string
  430. # description: 审批状态
  431. contractType:
  432. type: string
  433. description: 合同类型
  434. # contractAmount:
  435. # type: number
  436. # description: 合同金额
  437. # invoiceAmount:
  438. # type: number
  439. # description: 已开票金额
  440. # collectedAmount:
  441. # type: number
  442. # description: 已回款金额
  443. contractStartTime:
  444. type: string
  445. description: 合同开始时间
  446. contractEndTime:
  447. type: string
  448. description: 合同结束时间
  449. # inchargeId:
  450. # type: integer
  451. # description: 负责人ID
  452. # inchargeName:
  453. # type: string
  454. # description: 负责人
  455. signatoryId:
  456. type: integer
  457. description: 公司签约人ID
  458. signatoryName:
  459. type: string
  460. description: 公司签约人
  461. distributorId:
  462. type: integer
  463. description: 经销商ID
  464. distributorName:
  465. type: string
  466. description: 经销商
  467. remark:
  468. type: string
  469. description: 备注
  470. product:
  471. type: array
  472. description: 产品
  473. items:
  474. type: object
  475. properties:
  476. prodId:
  477. type: integer
  478. description: 关联产品
  479. prodNum:
  480. type: integer
  481. description: 产品数量
  482. maintTerm:
  483. type: integer
  484. description: 维保期
  485. sugSalesPrice:
  486. type: number
  487. description: 建议成交价
  488. tranPrice:
  489. type: number
  490. description: 成交价格
  491. remark:
  492. type: string
  493. description: 备注
  494. CtrContractTransfer:
  495. type: object
  496. required:
  497. - id
  498. properties:
  499. id:
  500. type: integer
  501. description: Id
  502. inchargeId:
  503. type: integer
  504. description: 负责人ID
  505. inchargeName:
  506. type: string
  507. description: 负责人
  508. examples:
  509. success:
  510. summary: 请求成功
  511. value:
  512. code: 200,
  513. msg: "success"
  514. NullableReqAllPass:
  515. value:
  516. Str: ""
  517. Int: 0
  518. Bool: false
  519. Slice: []
  520. NoArgs:
  521. value:
  522. noargs: ""
  523. IdReq:
  524. value:
  525. id: 2
  526. IdsReq:
  527. value:
  528. id: [1]
  529. CtrContractList:
  530. value:
  531. searchText: ""
  532. CtrContractAdd:
  533. value:
  534. contractCode: "1"
  535. contractName: "1"
  536. nboId: 1
  537. contractType: "1"
  538. contractStartTime: "2020-01-01 01:01:01"
  539. contractEndTime: "2020-01-01 01:01:01"
  540. inchargeId: 1
  541. inchargeName: "管理员"
  542. signatoryId: 1
  543. signatoryName: "管理员"
  544. distributorId: 1
  545. distributorName: "管理员"
  546. remark: "备注"
  547. product:
  548. -
  549. prodId: 2
  550. prodNum: 1
  551. maintTerm: 1
  552. sugSalesPrice: 1
  553. tranPrice: 1
  554. remark: "备注"
  555. CtrContractUpdate:
  556. value:
  557. id: 2
  558. contractCode: "2"
  559. contractName: "2"
  560. nboId: 2
  561. contractType: "2"
  562. contractStartTime: "2020-01-01 02:02:02"
  563. contractEndTime: "2020-01-01 02:02:02"
  564. signatoryId: 1
  565. signatoryName: "管理员"
  566. distributorId: 1
  567. distributorName: "管理员"
  568. remark: "备注2"
  569. product: []
  570. CtrContractTransfer:
  571. id: 2
  572. inchargeId: 2
  573. inchargeName: "管理员2"