1144b0aae3f4333c9ba5def80a72973b4aa9cc86.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. basePath: /
  2. info:
  3. contact:
  4. email: kptzhu@163.com
  5. name: 朱红宾
  6. url: https://www.dairyinfo.com.cn
  7. description: kptyun_service
  8. license: {}
  9. title: 科湃腾Go语言后台API
  10. version: 1.1.2
  11. paths:
  12. /auth:
  13. post:
  14. consumes:
  15. - application/json
  16. parameters:
  17. - description: admin
  18. in: formData
  19. name: username
  20. required: true
  21. type: string
  22. - description: "123456"
  23. in: formData
  24. name: password
  25. required: true
  26. type: string
  27. produces:
  28. - application/json
  29. responses:
  30. "200":
  31. description: '{ "code": 200e, "data": { "token": "xxx" }, "msg": "ok" }'
  32. schema:
  33. type: string
  34. "400":
  35. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  36. schema:
  37. type: string
  38. "404":
  39. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  40. schema:
  41. type: string
  42. summary: 获取登录token 信息
  43. tags:
  44. - auth
  45. /authdata/GetRoleMenus:
  46. get:
  47. consumes:
  48. - application/json
  49. parameters:
  50. - description: Ton
  51. in: query
  52. name: Ton
  53. required: true
  54. type: string
  55. produces:
  56. - application/json
  57. responses:
  58. "200":
  59. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  60. schema:
  61. type: string
  62. summary: 递归获取所有
  63. tags:
  64. - menu
  65. /authdata/menus:
  66. get:
  67. consumes:
  68. - application/json
  69. parameters:
  70. - description: Ton
  71. in: query
  72. name: Ton
  73. required: true
  74. type: string
  75. produces:
  76. - application/json
  77. responses:
  78. "200":
  79. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  80. schema:
  81. type: string
  82. summary: 获取所有菜单
  83. tags:
  84. - menu
  85. post:
  86. consumes:
  87. - application/json
  88. parameters:
  89. - description: name
  90. in: query
  91. name: name
  92. required: true
  93. type: string
  94. - description: path
  95. in: query
  96. name: path
  97. required: true
  98. type: string
  99. produces:
  100. - application/json
  101. responses:
  102. "200":
  103. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  104. schema:
  105. type: string
  106. summary: 增加菜单
  107. tags:
  108. - menu
  109. /authdata/menus/:
  110. delete:
  111. consumes:
  112. - application/json
  113. parameters:
  114. - description: id
  115. in: path
  116. name: id
  117. required: true
  118. type: string
  119. produces:
  120. - application/json
  121. responses:
  122. "200":
  123. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  124. schema:
  125. type: string
  126. summary: 删除菜单
  127. tags:
  128. - menu
  129. get:
  130. consumes:
  131. - application/json
  132. parameters:
  133. - description: id
  134. in: path
  135. name: id
  136. required: true
  137. type: string
  138. produces:
  139. - application/json
  140. responses:
  141. "200":
  142. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  143. schema:
  144. type: string
  145. summary: 获取单个菜单
  146. tags:
  147. - menu
  148. put:
  149. consumes:
  150. - application/json
  151. parameters:
  152. - description: id
  153. in: path
  154. name: id
  155. required: true
  156. type: string
  157. - description: name
  158. in: query
  159. name: name
  160. required: true
  161. type: string
  162. - description: path
  163. in: query
  164. name: path
  165. required: true
  166. type: string
  167. - description: method
  168. in: query
  169. name: method
  170. required: true
  171. type: string
  172. produces:
  173. - application/json
  174. responses:
  175. "200":
  176. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  177. schema:
  178. type: string
  179. summary: 更新菜单
  180. tags:
  181. - menu
  182. /authdata/roles:
  183. get:
  184. consumes:
  185. - application/json
  186. produces:
  187. - application/json
  188. responses:
  189. "200":
  190. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  191. schema:
  192. type: string
  193. summary: 获取所有角色
  194. tags:
  195. - role
  196. post:
  197. consumes:
  198. - application/json
  199. parameters:
  200. - description: name
  201. in: query
  202. name: name
  203. required: true
  204. type: string
  205. - description: menu_id
  206. in: query
  207. name: menu_id
  208. required: true
  209. type: string
  210. produces:
  211. - application/json
  212. responses:
  213. "200":
  214. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  215. schema:
  216. type: string
  217. summary: 增加角色
  218. tags:
  219. - role
  220. /authdata/roles/:
  221. delete:
  222. consumes:
  223. - application/json
  224. parameters:
  225. - description: id
  226. in: path
  227. name: id
  228. required: true
  229. type: string
  230. produces:
  231. - application/json
  232. responses:
  233. "200":
  234. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  235. schema:
  236. type: string
  237. summary: 删除角色
  238. tags:
  239. - role
  240. get:
  241. consumes:
  242. - application/json
  243. parameters:
  244. - description: id
  245. in: path
  246. name: id
  247. required: true
  248. type: string
  249. produces:
  250. - application/json
  251. responses:
  252. "200":
  253. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  254. schema:
  255. type: string
  256. summary: 获取单个角色
  257. tags:
  258. - role
  259. put:
  260. consumes:
  261. - application/json
  262. parameters:
  263. - description: id
  264. in: path
  265. name: id
  266. required: true
  267. type: string
  268. - description: name
  269. in: query
  270. name: name
  271. required: true
  272. type: string
  273. - description: menu_id
  274. in: query
  275. name: menu_id
  276. required: true
  277. type: string
  278. produces:
  279. - application/json
  280. responses:
  281. "200":
  282. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  283. schema:
  284. type: string
  285. summary: 更新角色
  286. tags:
  287. - role
  288. /authdata/userinfo:
  289. get:
  290. consumes:
  291. - application/json
  292. parameters:
  293. - description: iddd
  294. in: path
  295. name: id
  296. required: true
  297. type: integer
  298. produces:
  299. - application/json
  300. responses:
  301. "200":
  302. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  303. schema:
  304. type: string
  305. summary: 获取单个用户信息
  306. tags:
  307. - users
  308. /authdata/users:
  309. get:
  310. consumes:
  311. - application/json
  312. parameters:
  313. - description: username
  314. in: path
  315. name: username
  316. type: string
  317. produces:
  318. - application/json
  319. responses:
  320. "200":
  321. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  322. schema:
  323. type: string
  324. summary: 获取所有用户
  325. tags:
  326. - users
  327. post:
  328. consumes:
  329. - application/json
  330. parameters:
  331. - description: username
  332. in: query
  333. name: username
  334. required: true
  335. type: string
  336. - description: password
  337. in: query
  338. name: password
  339. required: true
  340. type: string
  341. - description: role_id
  342. in: path
  343. name: role_id
  344. type: integer
  345. produces:
  346. - application/json
  347. responses:
  348. "200":
  349. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  350. schema:
  351. type: string
  352. summary: 增加用户1
  353. tags:
  354. - users
  355. /authdata/users/:
  356. delete:
  357. consumes:
  358. - application/json
  359. parameters:
  360. - description: id
  361. in: path
  362. name: id
  363. required: true
  364. type: integer
  365. produces:
  366. - application/json
  367. responses:
  368. "200":
  369. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  370. schema:
  371. type: string
  372. summary: 删除用户
  373. tags:
  374. - users
  375. get:
  376. consumes:
  377. - application/json
  378. parameters:
  379. - description: id
  380. in: path
  381. name: id
  382. required: true
  383. type: integer
  384. produces:
  385. - application/json
  386. responses:
  387. "200":
  388. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  389. schema:
  390. type: string
  391. summary: 获取单个用户信息
  392. tags:
  393. - users
  394. put:
  395. consumes:
  396. - application/json
  397. parameters:
  398. - description: username
  399. in: query
  400. name: username
  401. required: true
  402. type: string
  403. - description: password
  404. in: query
  405. name: password
  406. required: true
  407. type: string
  408. - description: role_id
  409. in: query
  410. name: role_id
  411. type: integer
  412. produces:
  413. - application/json
  414. responses:
  415. "200":
  416. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  417. schema:
  418. type: string
  419. summary: 更新用户
  420. tags:
  421. - users
  422. /data/GetDataByNameForm:
  423. post:
  424. consumes:
  425. - application/json
  426. parameters:
  427. - description: sqlname
  428. in: body
  429. name: sqlname
  430. required: true
  431. schema:
  432. $ref: '#/definitions/json'
  433. type: object
  434. - description: offset
  435. in: query
  436. name: offset
  437. required: true
  438. type: integer
  439. - description: pagecount
  440. in: query
  441. name: pagecount
  442. required: true
  443. type: integer
  444. - description: returntype
  445. in: query
  446. name: returntype
  447. required: true
  448. type: string
  449. - description: ss
  450. in: formData
  451. name: s
  452. required: true
  453. type: json
  454. produces:
  455. - application/json
  456. responses:
  457. "200":
  458. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  459. schema:
  460. type: string
  461. "400":
  462. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  463. schema:
  464. type: string
  465. "404":
  466. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  467. schema:
  468. type: string
  469. summary: 根据APISQL表中SQL执行得到数据集
  470. tags:
  471. - GetDataByNameForm
  472. /data/GetDataByNames:
  473. post:
  474. consumes:
  475. - application/json
  476. parameters:
  477. - description: offset
  478. in: query
  479. name: offset
  480. required: true
  481. type: integer
  482. - description: pagecount
  483. in: query
  484. name: pagecount
  485. required: true
  486. type: integer
  487. - description: returntype
  488. in: query
  489. name: returntype
  490. required: true
  491. type: string
  492. produces:
  493. - application/json
  494. responses:
  495. "200":
  496. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  497. schema:
  498. type: string
  499. "400":
  500. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  501. schema:
  502. type: string
  503. "404":
  504. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  505. schema:
  506. type: string
  507. summary: 根据APISQL表中SQL执行得到数据集
  508. tags:
  509. - GetDataByNames
  510. /data/ImportExcel:
  511. post:
  512. consumes:
  513. - application/json
  514. parameters:
  515. - description: 文件名
  516. in: query
  517. name: file
  518. required: true
  519. type: string
  520. - description: 执行sql的名字
  521. in: header
  522. name: name
  523. required: true
  524. type: string
  525. produces:
  526. - application/json
  527. responses:
  528. "200":
  529. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  530. schema:
  531. type: string
  532. "400":
  533. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  534. schema:
  535. type: string
  536. "404":
  537. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  538. schema:
  539. type: string
  540. summary: 导入excel文件到数据库,excel第一行作为参数
  541. tags:
  542. - ImportExcel
  543. /data/PostDataByName:
  544. post:
  545. consumes:
  546. - application/json
  547. parameters:
  548. - description: sqlname
  549. in: query
  550. name: sqlname
  551. required: true
  552. type: string
  553. - description: offset
  554. in: query
  555. name: offset
  556. required: true
  557. type: integer
  558. - description: pagecount
  559. in: query
  560. name: pagecount
  561. required: true
  562. type: integer
  563. - description: returntype
  564. in: query
  565. name: returntype
  566. required: true
  567. type: string
  568. produces:
  569. - application/json
  570. responses:
  571. "200":
  572. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  573. schema:
  574. type: string
  575. "400":
  576. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  577. schema:
  578. type: string
  579. "404":
  580. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  581. schema:
  582. type: string
  583. summary: 根据APISQL表中SQL执行得到数据集
  584. tags:
  585. - PostDataByName
  586. /data/PostDataByNameForm:
  587. post:
  588. consumes:
  589. - application/json
  590. parameters:
  591. - description: sqlname
  592. in: query
  593. name: sqlname
  594. required: true
  595. type: string
  596. - description: offset
  597. in: query
  598. name: offset
  599. required: true
  600. type: integer
  601. - description: pagecount
  602. in: query
  603. name: pagecount
  604. required: true
  605. type: integer
  606. - description: returntype
  607. in: query
  608. name: returntype
  609. required: true
  610. type: string
  611. produces:
  612. - application/json
  613. responses:
  614. "200":
  615. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  616. schema:
  617. type: string
  618. "400":
  619. description: '{"code":400, "data":null,"msg":"请求参数错误朱红彬彬"}'
  620. schema:
  621. type: string
  622. "404":
  623. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  624. schema:
  625. type: string
  626. summary: 根据APISQL表中SQL执行得到数据集
  627. tags:
  628. - PostDataByNameForm
  629. /data/PostDatasByName:
  630. post:
  631. consumes:
  632. - application/json
  633. parameters:
  634. - description: sqlname
  635. in: query
  636. name: sqlname
  637. required: true
  638. type: string
  639. - description: offset
  640. in: query
  641. name: offset
  642. required: true
  643. type: integer
  644. - description: pagecount
  645. in: query
  646. name: pagecount
  647. required: true
  648. type: integer
  649. - description: returntype
  650. in: query
  651. name: returntype
  652. required: true
  653. type: string
  654. produces:
  655. - application/json
  656. responses:
  657. "200":
  658. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  659. schema:
  660. type: string
  661. "400":
  662. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  663. schema:
  664. type: string
  665. "404":
  666. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  667. schema:
  668. type: string
  669. summary: 根据APISQL表中SQL执行得到数据集
  670. tags:
  671. - PostDatasByName
  672. /data/getdata:
  673. post:
  674. consumes:
  675. - application/json
  676. parameters:
  677. - description: sql
  678. in: query
  679. name: sql
  680. required: true
  681. type: string
  682. produces:
  683. - application/json
  684. responses:
  685. "200":
  686. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  687. schema:
  688. type: string
  689. "400":
  690. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  691. schema:
  692. type: string
  693. "404":
  694. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  695. schema:
  696. type: string
  697. summary: 根据SQL执行得到数据集
  698. tags:
  699. - getData
  700. swagger: "2.0"