You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

849 lines
19 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. basePath: /
  2. definitions:
  3. api.AddMenuAuthorityInfo:
  4. properties:
  5. authorityId:
  6. type: string
  7. menus:
  8. items:
  9. $ref: '#/definitions/dbModel.BaseMenu'
  10. type: array
  11. type: object
  12. api.AuthAndPathIn:
  13. properties:
  14. apiIds:
  15. items:
  16. type: integer
  17. type: array
  18. authorityId:
  19. type: string
  20. type: object
  21. api.AuthorityIdInfo:
  22. properties:
  23. authorityId:
  24. type: string
  25. type: object
  26. api.ChangePasswordStutrc:
  27. properties:
  28. newPassword:
  29. type: string
  30. password:
  31. type: string
  32. username:
  33. type: string
  34. type: object
  35. api.CreateApiParams:
  36. properties:
  37. description:
  38. type: string
  39. path:
  40. type: string
  41. type: object
  42. api.CreateAuthorityPatams:
  43. properties:
  44. authorityId:
  45. type: string
  46. authorityName:
  47. type: string
  48. type: object
  49. api.DeleteAuthorityPatams:
  50. properties:
  51. authorityId:
  52. type: integer
  53. type: object
  54. api.GetAuthorityId:
  55. properties:
  56. authorityId:
  57. type: string
  58. type: object
  59. api.GetById:
  60. properties:
  61. id:
  62. type: number
  63. type: object
  64. api.IdInfo:
  65. properties:
  66. id:
  67. type: number
  68. type: object
  69. api.RegistAndLoginStuct:
  70. properties:
  71. password:
  72. type: string
  73. username:
  74. type: string
  75. type: object
  76. api.SetUserAuth:
  77. properties:
  78. authorityId:
  79. type: string
  80. uuid:
  81. type: string
  82. type: object
  83. dbModel.Api:
  84. properties:
  85. description:
  86. type: string
  87. group:
  88. type: string
  89. path:
  90. type: string
  91. type: object
  92. dbModel.BaseMenu:
  93. properties:
  94. children:
  95. items:
  96. $ref: '#/definitions/dbModel.BaseMenu'
  97. type: array
  98. component:
  99. type: string
  100. hidden:
  101. type: boolean
  102. icon:
  103. type: string
  104. name:
  105. type: string
  106. nickName:
  107. type: string
  108. parentId:
  109. type: string
  110. path:
  111. type: string
  112. title:
  113. type: string
  114. type: object
  115. dbModel.FileUploadAndDownload:
  116. properties:
  117. key:
  118. type: string
  119. name:
  120. type: string
  121. tag:
  122. type: string
  123. url:
  124. type: string
  125. type: object
  126. dbModel.Workflow:
  127. properties:
  128. workflowDescription:
  129. description: 工作流描述
  130. type: string
  131. workflowName:
  132. description: 工作流英文id
  133. type: string
  134. workflowNickName:
  135. description: 工作流名称
  136. type: string
  137. workflowStep:
  138. description: 工作流步骤
  139. items:
  140. $ref: '#/definitions/dbModel.WorkflowStepInfo'
  141. type: array
  142. type: object
  143. dbModel.WorkflowStepInfo:
  144. properties:
  145. isEnd:
  146. description: 是否是完结流节点
  147. type: boolean
  148. isStrat:
  149. description: 是否是开始流节点
  150. type: boolean
  151. stepAuthorityID:
  152. description: 操作者级别id
  153. type: string
  154. stepName:
  155. description: 工作流名称
  156. type: string
  157. stepNo:
  158. description: 步骤id (第几步)
  159. type: number
  160. type: object
  161. modelInterface.PageInfo:
  162. properties:
  163. page:
  164. type: integer
  165. pageSize:
  166. type: integer
  167. type: object
  168. info:
  169. contact: {}
  170. description: This is a sample Server pets
  171. license: {}
  172. title: Swagger Example API
  173. version: 0.0.1
  174. paths:
  175. /api/createApi:
  176. post:
  177. consumes:
  178. - application/json
  179. parameters:
  180. - description: 创建api
  181. in: body
  182. name: data
  183. required: true
  184. schema:
  185. $ref: '#/definitions/api.CreateApiParams'
  186. type: object
  187. produces:
  188. - application/json
  189. responses:
  190. "200":
  191. description: '{"success":true,"data":{},"msg":"获取成功"}'
  192. schema:
  193. type: string
  194. security:
  195. - ApiKeyAuth: []
  196. summary: 创建基础api
  197. tags:
  198. - Api
  199. /api/deleteApi:
  200. post:
  201. consumes:
  202. - application/json
  203. parameters:
  204. - description: 删除api
  205. in: body
  206. name: data
  207. required: true
  208. schema:
  209. $ref: '#/definitions/dbModel.Api'
  210. type: object
  211. produces:
  212. - application/json
  213. responses:
  214. "200":
  215. description: '{"success":true,"data":{},"msg":"获取成功"}'
  216. schema:
  217. type: string
  218. security:
  219. - ApiKeyAuth: []
  220. summary: 删除指定api
  221. tags:
  222. - Api
  223. /api/getAllApis:
  224. post:
  225. consumes:
  226. - application/json
  227. produces:
  228. - application/json
  229. responses:
  230. "200":
  231. description: '{"success":true,"data":{},"msg":"获取成功"}'
  232. schema:
  233. type: string
  234. security:
  235. - ApiKeyAuth: []
  236. summary: 获取所有的Api 不分页
  237. tags:
  238. - Api
  239. /api/getApiById:
  240. post:
  241. consumes:
  242. - application/json
  243. parameters:
  244. - description: 分页获取用户列表
  245. in: body
  246. name: data
  247. required: true
  248. schema:
  249. $ref: '#/definitions/modelInterface.PageInfo'
  250. type: object
  251. produces:
  252. - application/json
  253. responses:
  254. "200":
  255. description: '{"success":true,"data":{},"msg":"获取成功"}'
  256. schema:
  257. type: string
  258. security:
  259. - ApiKeyAuth: []
  260. summary: 根据id获取api
  261. tags:
  262. - Api
  263. /api/getApiList:
  264. post:
  265. consumes:
  266. - application/json
  267. parameters:
  268. - description: 分页获取API列表
  269. in: body
  270. name: data
  271. required: true
  272. schema:
  273. $ref: '#/definitions/modelInterface.PageInfo'
  274. type: object
  275. produces:
  276. - application/json
  277. responses:
  278. "200":
  279. description: '{"success":true,"data":{},"msg":"获取成功"}'
  280. schema:
  281. type: string
  282. security:
  283. - ApiKeyAuth: []
  284. summary: 分页获取API列表
  285. tags:
  286. - Api
  287. /api/setAuthAndApi:
  288. post:
  289. consumes:
  290. - application/json
  291. parameters:
  292. - description: 创建api和角色关系
  293. in: body
  294. name: data
  295. required: true
  296. schema:
  297. $ref: '#/definitions/api.AuthAndPathIn'
  298. type: object
  299. produces:
  300. - application/json
  301. responses:
  302. "200":
  303. description: '{"success":true,"data":{},"msg":"获取成功"}'
  304. schema:
  305. type: string
  306. security:
  307. - ApiKeyAuth: []
  308. summary: 创建api和角色关系
  309. tags:
  310. - Api
  311. /api/updataApi:
  312. post:
  313. consumes:
  314. - application/json
  315. parameters:
  316. - description: 创建api
  317. in: body
  318. name: data
  319. required: true
  320. schema:
  321. $ref: '#/definitions/api.CreateApiParams'
  322. type: object
  323. produces:
  324. - application/json
  325. responses:
  326. "200":
  327. description: '{"success":true,"data":{},"msg":"获取成功"}'
  328. schema:
  329. type: string
  330. security:
  331. - ApiKeyAuth: []
  332. summary: 创建基础api
  333. tags:
  334. - Api
  335. /authority/createAuthority:
  336. post:
  337. consumes:
  338. - application/json
  339. parameters:
  340. - description: 创建角色
  341. in: body
  342. name: data
  343. required: true
  344. schema:
  345. $ref: '#/definitions/api.CreateAuthorityPatams'
  346. type: object
  347. produces:
  348. - application/json
  349. responses:
  350. "200":
  351. description: '{"success":true,"data":{},"msg":"获取成功"}'
  352. schema:
  353. type: string
  354. security:
  355. - ApiKeyAuth: []
  356. summary: 创建角色
  357. tags:
  358. - authority
  359. /authority/deleteAuthority:
  360. post:
  361. consumes:
  362. - application/json
  363. parameters:
  364. - description: 删除角色
  365. in: body
  366. name: data
  367. required: true
  368. schema:
  369. $ref: '#/definitions/api.DeleteAuthorityPatams'
  370. type: object
  371. produces:
  372. - application/json
  373. responses:
  374. "200":
  375. description: '{"success":true,"data":{},"msg":"获取成功"}'
  376. schema:
  377. type: string
  378. security:
  379. - ApiKeyAuth: []
  380. summary: 删除角色
  381. tags:
  382. - authority
  383. /authority/getAuthAndApi:
  384. post:
  385. consumes:
  386. - application/json
  387. parameters:
  388. - description: 获取本角色所有有权限的apiId
  389. in: body
  390. name: data
  391. required: true
  392. schema:
  393. $ref: '#/definitions/api.GetAuthorityId'
  394. type: object
  395. produces:
  396. - application/json
  397. responses:
  398. "200":
  399. description: '{"success":true,"data":{},"msg":"获取成功"}'
  400. schema:
  401. type: string
  402. security:
  403. - ApiKeyAuth: []
  404. summary: 获取本角色所有有权限的apiId
  405. tags:
  406. - authority
  407. /authority/getAuthorityList:
  408. post:
  409. consumes:
  410. - application/json
  411. parameters:
  412. - description: 分页获取用户列表
  413. in: body
  414. name: data
  415. required: true
  416. schema:
  417. $ref: '#/definitions/modelInterface.PageInfo'
  418. type: object
  419. produces:
  420. - application/json
  421. responses:
  422. "200":
  423. description: '{"success":true,"data":{},"msg":"获取成功"}'
  424. schema:
  425. type: string
  426. security:
  427. - ApiKeyAuth: []
  428. summary: 分页获取角色列表
  429. tags:
  430. - authority
  431. /base/login:
  432. post:
  433. parameters:
  434. - description: 用户登录接口
  435. in: body
  436. name: data
  437. required: true
  438. schema:
  439. $ref: '#/definitions/api.RegistAndLoginStuct'
  440. type: object
  441. produces:
  442. - application/json
  443. responses:
  444. "200":
  445. description: '{"success":true,"data":{},"msg":"登陆成功"}'
  446. schema:
  447. type: string
  448. summary: 用户登录
  449. tags:
  450. - Base
  451. /base/regist:
  452. post:
  453. parameters:
  454. - description: 用户注册接口
  455. in: body
  456. name: data
  457. required: true
  458. schema:
  459. $ref: '#/definitions/api.RegistAndLoginStuct'
  460. type: object
  461. produces:
  462. - application/json
  463. responses:
  464. "200":
  465. description: '{"success":true,"data":{},"msg":"注册成功"}'
  466. schema:
  467. type: string
  468. summary: 用户注册账号
  469. tags:
  470. - Base
  471. /fileUploadAndDownload/deleteFile:
  472. post:
  473. parameters:
  474. - description: 传入文件里面id即可
  475. in: body
  476. name: data
  477. required: true
  478. schema:
  479. $ref: '#/definitions/dbModel.FileUploadAndDownload'
  480. type: object
  481. produces:
  482. - application/json
  483. responses:
  484. "200":
  485. description: '{"success":true,"data":{},"msg":"返回成功"}'
  486. schema:
  487. type: string
  488. security:
  489. - ApiKeyAuth: []
  490. summary: 删除文件
  491. tags:
  492. - FileUploadAndDownload
  493. /fileUploadAndDownload/getFileList:
  494. post:
  495. consumes:
  496. - application/json
  497. parameters:
  498. - description: 分页获取文件户列表
  499. in: body
  500. name: data
  501. required: true
  502. schema:
  503. $ref: '#/definitions/modelInterface.PageInfo'
  504. type: object
  505. produces:
  506. - application/json
  507. responses:
  508. "200":
  509. description: '{"success":true,"data":{},"msg":"获取成功"}'
  510. schema:
  511. type: string
  512. security:
  513. - ApiKeyAuth: []
  514. summary: 分页文件列表
  515. tags:
  516. - FileUploadAndDownload
  517. /fileUploadAndDownload/upload:
  518. post:
  519. consumes:
  520. - multipart/form-data
  521. parameters:
  522. - description: 上传文件示例
  523. in: formData
  524. name: file
  525. required: true
  526. type: file
  527. produces:
  528. - application/json
  529. responses:
  530. "200":
  531. description: '{"success":true,"data":{},"msg":"上传成功"}'
  532. schema:
  533. type: string
  534. security:
  535. - ApiKeyAuth: []
  536. summary: 上传文件示例
  537. tags:
  538. - FileUploadAndDownload
  539. /menu/addBaseMenu:
  540. post:
  541. consumes:
  542. - application/json
  543. parameters:
  544. - description: 新增菜单
  545. in: body
  546. name: data
  547. required: true
  548. schema:
  549. $ref: '#/definitions/dbModel.BaseMenu'
  550. type: object
  551. produces:
  552. - application/json
  553. responses:
  554. "200":
  555. description: '{"success":true,"data":{},"msg":"获取成功"}'
  556. schema:
  557. type: string
  558. security:
  559. - ApiKeyAuth: []
  560. summary: 新增菜单
  561. tags:
  562. - menu
  563. /menu/addMenuAuthority:
  564. post:
  565. consumes:
  566. - application/json
  567. parameters:
  568. - description: 增加menu和角色关联关系
  569. in: body
  570. name: data
  571. required: true
  572. schema:
  573. $ref: '#/definitions/api.AuthorityIdInfo'
  574. type: object
  575. produces:
  576. - application/json
  577. responses:
  578. "200":
  579. description: '{"success":true,"data":{},"msg":"获取成功"}'
  580. schema:
  581. type: string
  582. security:
  583. - ApiKeyAuth: []
  584. summary: 获取指定角色menu
  585. tags:
  586. - authorityAndMenu
  587. /menu/deleteBaseMenu:
  588. post:
  589. consumes:
  590. - application/json
  591. parameters:
  592. - description: 删除菜单
  593. in: body
  594. name: data
  595. required: true
  596. schema:
  597. $ref: '#/definitions/api.IdInfo'
  598. type: object
  599. produces:
  600. - application/json
  601. responses:
  602. "200":
  603. description: '{"success":true,"data":{},"msg":"获取成功"}'
  604. schema:
  605. type: string
  606. security:
  607. - ApiKeyAuth: []
  608. summary: 删除菜单
  609. tags:
  610. - menu
  611. /menu/getBaseMenuById:
  612. post:
  613. consumes:
  614. - application/json
  615. parameters:
  616. - description: 根据id获取菜单
  617. in: body
  618. name: data
  619. required: true
  620. schema:
  621. $ref: '#/definitions/api.GetById'
  622. type: object
  623. produces:
  624. - application/json
  625. responses:
  626. "200":
  627. description: '{"success":true,"data":{},"msg":"获取成功"}'
  628. schema:
  629. type: string
  630. security:
  631. - ApiKeyAuth: []
  632. summary: 根据id获取菜单
  633. tags:
  634. - menu
  635. /menu/getBaseMenuTree:
  636. post:
  637. parameters:
  638. - description: 可以什么都不填
  639. in: body
  640. name: data
  641. required: true
  642. schema:
  643. $ref: '#/definitions/api.RegistAndLoginStuct'
  644. type: object
  645. produces:
  646. - application/json
  647. responses:
  648. "200":
  649. description: '{"success":true,"data":{},"msg":"返回成功"}'
  650. schema:
  651. type: string
  652. security:
  653. - ApiKeyAuth: []
  654. summary: 获取用户动态路由
  655. tags:
  656. - authorityAndMenu
  657. /menu/getMenu:
  658. post:
  659. parameters:
  660. - description: 可以什么都不填
  661. in: body
  662. name: data
  663. required: true
  664. schema:
  665. $ref: '#/definitions/api.RegistAndLoginStuct'
  666. type: object
  667. produces:
  668. - application/json
  669. responses:
  670. "200":
  671. description: '{"success":true,"data":{},"msg":"返回成功"}'
  672. schema:
  673. type: string
  674. security:
  675. - ApiKeyAuth: []
  676. summary: 获取用户动态路由
  677. tags:
  678. - authorityAndMenu
  679. /menu/getMenuList:
  680. post:
  681. consumes:
  682. - application/json
  683. parameters:
  684. - description: 分页获取基础menu列表
  685. in: body
  686. name: data
  687. required: true
  688. schema:
  689. $ref: '#/definitions/modelInterface.PageInfo'
  690. type: object
  691. produces:
  692. - application/json
  693. responses:
  694. "200":
  695. description: '{"success":true,"data":{},"msg":"获取成功"}'
  696. schema:
  697. type: string
  698. security:
  699. - ApiKeyAuth: []
  700. summary: 分页获取基础menu列表
  701. tags:
  702. - menu
  703. /menu/updataBaseMen:
  704. post:
  705. consumes:
  706. - application/json
  707. parameters:
  708. - description: 更新菜单
  709. in: body
  710. name: data
  711. required: true
  712. schema:
  713. $ref: '#/definitions/dbModel.BaseMenu'
  714. type: object
  715. produces:
  716. - application/json
  717. responses:
  718. "200":
  719. description: '{"success":true,"data":{},"msg":"获取成功"}'
  720. schema:
  721. type: string
  722. security:
  723. - ApiKeyAuth: []
  724. summary: 更新菜单
  725. tags:
  726. - menu
  727. /user/changePassword:
  728. post:
  729. parameters:
  730. - description: 用户修改密码
  731. in: body
  732. name: data
  733. required: true
  734. schema:
  735. $ref: '#/definitions/api.ChangePasswordStutrc'
  736. type: object
  737. produces:
  738. - application/json
  739. responses:
  740. "200":
  741. description: '{"success":true,"data":{},"msg":"修改成功"}'
  742. schema:
  743. type: string
  744. security:
  745. - ApiKeyAuth: []
  746. summary: 用户修改密码
  747. tags:
  748. - User
  749. /user/getUserList:
  750. post:
  751. consumes:
  752. - application/json
  753. parameters:
  754. - description: 分页获取用户列表
  755. in: body
  756. name: data
  757. required: true
  758. schema:
  759. $ref: '#/definitions/modelInterface.PageInfo'
  760. type: object
  761. produces:
  762. - application/json
  763. responses:
  764. "200":
  765. description: '{"success":true,"data":{},"msg":"获取成功"}'
  766. schema:
  767. type: string
  768. security:
  769. - ApiKeyAuth: []
  770. summary: 分页获取用户列表
  771. tags:
  772. - User
  773. /user/setUserAuthority:
  774. post:
  775. consumes:
  776. - application/json
  777. parameters:
  778. - description: 设置用户权限
  779. in: body
  780. name: data
  781. required: true
  782. schema:
  783. $ref: '#/definitions/api.SetUserAuth'
  784. type: object
  785. produces:
  786. - application/json
  787. responses:
  788. "200":
  789. description: '{"success":true,"data":{},"msg":"修改成功"}'
  790. schema:
  791. type: string
  792. security:
  793. - ApiKeyAuth: []
  794. summary: 设置用户权限
  795. tags:
  796. - User
  797. /user/uploadHeaderImg:
  798. post:
  799. consumes:
  800. - multipart/form-data
  801. parameters:
  802. - description: 用户上传头像
  803. in: formData
  804. name: headerImg
  805. required: true
  806. type: file
  807. - description: 用户上传头像
  808. in: formData
  809. name: username
  810. required: true
  811. type: string
  812. produces:
  813. - application/json
  814. responses:
  815. "200":
  816. description: '{"success":true,"data":{},"msg":"上传成功"}'
  817. schema:
  818. type: string
  819. security:
  820. - ApiKeyAuth: []
  821. summary: 用户上传头像
  822. tags:
  823. - User
  824. /workflow/createWorkFlow:
  825. post:
  826. parameters:
  827. - description: 注册工作流接口
  828. in: body
  829. name: data
  830. required: true
  831. schema:
  832. $ref: '#/definitions/dbModel.Workflow'
  833. type: object
  834. produces:
  835. - application/json
  836. responses:
  837. "200":
  838. description: '{"success":true,"data":{},"msg":"注册成功"}'
  839. schema:
  840. type: string
  841. summary: 注册工作流
  842. tags:
  843. - workflow
  844. securityDefinitions:
  845. ApiKeyAuth:
  846. in: header
  847. name: x-token
  848. type: apiKey
  849. swagger: "2.0"