广告平台(媒体使用)
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

859 righe
27 KiB

  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "媒体后台接口",
  5. "title": "广告联盟-媒体平台",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "dengbiao",
  9. "url": "http://www.swagger.io/support",
  10. "email": "1239118001@qq.com"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "host": "localhost:1004 or xxxxx.medium.dengbiao.top",
  19. "paths": {
  20. "/api/login": {
  21. "post": {
  22. "description": "登入",
  23. "consumes": [
  24. "application/json"
  25. ],
  26. "produces": [
  27. "application/json"
  28. ],
  29. "tags": [
  30. "ADMIN"
  31. ],
  32. "summary": "登陆",
  33. "parameters": [
  34. {
  35. "description": "用户名、密码",
  36. "name": "req",
  37. "in": "body",
  38. "required": true,
  39. "schema": {
  40. "$ref": "#/definitions/md.LoginReq"
  41. }
  42. }
  43. ],
  44. "responses": {
  45. "200": {
  46. "description": "token",
  47. "schema": {
  48. "$ref": "#/definitions/md.LoginResponse"
  49. }
  50. },
  51. "400": {
  52. "description": "具体错误",
  53. "schema": {
  54. "$ref": "#/definitions/md.Response"
  55. }
  56. }
  57. }
  58. }
  59. },
  60. "/api/role/addAdmin": {
  61. "post": {
  62. "description": "新增管理员",
  63. "consumes": [
  64. "application/json"
  65. ],
  66. "produces": [
  67. "application/json"
  68. ],
  69. "tags": [
  70. "ADMIN-权限管理"
  71. ],
  72. "summary": "新增管理员",
  73. "parameters": [
  74. {
  75. "type": "string",
  76. "description": "验证参数Bearer和token空格拼接",
  77. "name": "Authorization",
  78. "in": "header",
  79. "required": true
  80. },
  81. {
  82. "description": "请求参数",
  83. "name": "args",
  84. "in": "body",
  85. "required": true,
  86. "schema": {
  87. "$ref": "#/definitions/md.AddAdminReq"
  88. }
  89. }
  90. ],
  91. "responses": {
  92. "200": {
  93. "description": "success",
  94. "schema": {
  95. "type": "string"
  96. }
  97. },
  98. "400": {
  99. "description": "具体错误",
  100. "schema": {
  101. "$ref": "#/definitions/md.Response"
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "/api/role/addRole": {
  108. "post": {
  109. "description": "添加角色",
  110. "consumes": [
  111. "application/json"
  112. ],
  113. "produces": [
  114. "application/json"
  115. ],
  116. "tags": [
  117. "ADMIN-权限管理"
  118. ],
  119. "summary": "添加角色",
  120. "parameters": [
  121. {
  122. "type": "string",
  123. "description": "验证参数Bearer和token空格拼接",
  124. "name": "Authorization",
  125. "in": "header",
  126. "required": true
  127. },
  128. {
  129. "description": "请求参数",
  130. "name": "args",
  131. "in": "body",
  132. "required": true,
  133. "schema": {
  134. "$ref": "#/definitions/md.AddRoleReq"
  135. }
  136. }
  137. ],
  138. "responses": {
  139. "200": {
  140. "description": "success",
  141. "schema": {
  142. "type": "string"
  143. }
  144. },
  145. "400": {
  146. "description": "具体错误",
  147. "schema": {
  148. "$ref": "#/definitions/md.Response"
  149. }
  150. }
  151. }
  152. }
  153. },
  154. "/api/role/adminInfo": {
  155. "get": {
  156. "description": "管理员信息",
  157. "consumes": [
  158. "application/json"
  159. ],
  160. "produces": [
  161. "application/json"
  162. ],
  163. "tags": [
  164. "ADMIN-权限管理"
  165. ],
  166. "summary": "管理员信息",
  167. "parameters": [
  168. {
  169. "type": "string",
  170. "description": "验证参数Bearer和token空格拼接",
  171. "name": "Authorization",
  172. "in": "header",
  173. "required": true
  174. },
  175. {
  176. "type": "string",
  177. "description": "管理员id",
  178. "name": "adm_id",
  179. "in": "query",
  180. "required": true
  181. }
  182. ],
  183. "responses": {
  184. "200": {
  185. "description": "具体看返回内容",
  186. "schema": {
  187. "type": "string"
  188. }
  189. },
  190. "400": {
  191. "description": "具体错误",
  192. "schema": {
  193. "$ref": "#/definitions/md.Response"
  194. }
  195. }
  196. }
  197. }
  198. },
  199. "/api/role/adminList": {
  200. "post": {
  201. "description": "管理员列表",
  202. "consumes": [
  203. "application/json"
  204. ],
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "ADMIN-权限管理"
  210. ],
  211. "summary": "管理员列表",
  212. "parameters": [
  213. {
  214. "type": "string",
  215. "description": "验证参数Bearer和token空格拼接",
  216. "name": "Authorization",
  217. "in": "header",
  218. "required": true
  219. },
  220. {
  221. "description": "请求参数",
  222. "name": "args",
  223. "in": "body",
  224. "required": true,
  225. "schema": {
  226. "$ref": "#/definitions/md.AdminListReq"
  227. }
  228. }
  229. ],
  230. "responses": {
  231. "200": {
  232. "description": "具体看返回内容",
  233. "schema": {
  234. "type": "string"
  235. }
  236. },
  237. "400": {
  238. "description": "具体错误",
  239. "schema": {
  240. "$ref": "#/definitions/md.Response"
  241. }
  242. }
  243. }
  244. }
  245. },
  246. "/api/role/bindAdminRole/": {
  247. "post": {
  248. "description": "管理员绑定角色",
  249. "consumes": [
  250. "application/json"
  251. ],
  252. "produces": [
  253. "application/json"
  254. ],
  255. "tags": [
  256. "ADMIN-权限管理"
  257. ],
  258. "summary": "管理员绑定角色",
  259. "parameters": [
  260. {
  261. "type": "string",
  262. "description": "验证参数Bearer和token空格拼接",
  263. "name": "Authorization",
  264. "in": "header",
  265. "required": true
  266. },
  267. {
  268. "description": "请求参数",
  269. "name": "args",
  270. "in": "body",
  271. "required": true,
  272. "schema": {
  273. "$ref": "#/definitions/md.BindAdminRoleReq"
  274. }
  275. }
  276. ],
  277. "responses": {
  278. "200": {
  279. "description": "success",
  280. "schema": {
  281. "type": "string"
  282. }
  283. },
  284. "400": {
  285. "description": "具体错误",
  286. "schema": {
  287. "$ref": "#/definitions/md.Response"
  288. }
  289. }
  290. }
  291. }
  292. },
  293. "/api/role/deleteAdmin/{$adm_id}": {
  294. "delete": {
  295. "description": "删除管理员",
  296. "consumes": [
  297. "application/json"
  298. ],
  299. "produces": [
  300. "application/json"
  301. ],
  302. "tags": [
  303. "ADMIN-权限管理"
  304. ],
  305. "summary": "删除管理员",
  306. "parameters": [
  307. {
  308. "type": "string",
  309. "description": "验证参数Bearer和token空格拼接",
  310. "name": "Authorization",
  311. "in": "header",
  312. "required": true
  313. }
  314. ],
  315. "responses": {
  316. "200": {
  317. "description": "success",
  318. "schema": {
  319. "type": "string"
  320. }
  321. },
  322. "400": {
  323. "description": "具体错误",
  324. "schema": {
  325. "$ref": "#/definitions/md.Response"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/api/role/deleteRole/{$id}": {
  332. "delete": {
  333. "description": "删除角色",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "ADMIN-权限管理"
  342. ],
  343. "summary": "删除角色",
  344. "parameters": [
  345. {
  346. "type": "string",
  347. "description": "验证参数Bearer和token空格拼接",
  348. "name": "Authorization",
  349. "in": "header",
  350. "required": true
  351. },
  352. {
  353. "description": "请求参数",
  354. "name": "args",
  355. "in": "body",
  356. "required": true,
  357. "schema": {
  358. "$ref": "#/definitions/md.UpdateRoleStateReq"
  359. }
  360. }
  361. ],
  362. "responses": {
  363. "200": {
  364. "description": "success",
  365. "schema": {
  366. "type": "string"
  367. }
  368. },
  369. "400": {
  370. "description": "具体错误",
  371. "schema": {
  372. "$ref": "#/definitions/md.Response"
  373. }
  374. }
  375. }
  376. }
  377. },
  378. "/api/role/permissionGroupList": {
  379. "get": {
  380. "description": "权限组列表",
  381. "consumes": [
  382. "application/json"
  383. ],
  384. "produces": [
  385. "application/json"
  386. ],
  387. "tags": [
  388. "ADMIN-权限管理"
  389. ],
  390. "summary": "权限组列表",
  391. "parameters": [
  392. {
  393. "type": "string",
  394. "description": "验证参数Bearer和token空格拼接",
  395. "name": "Authorization",
  396. "in": "header",
  397. "required": true
  398. },
  399. {
  400. "type": "string",
  401. "description": "管理员id",
  402. "name": "adm_id",
  403. "in": "query",
  404. "required": true
  405. }
  406. ],
  407. "responses": {
  408. "200": {
  409. "description": "具体看返回内容",
  410. "schema": {
  411. "type": "string"
  412. }
  413. },
  414. "400": {
  415. "description": "具体错误",
  416. "schema": {
  417. "$ref": "#/definitions/md.Response"
  418. }
  419. }
  420. }
  421. }
  422. },
  423. "/api/role/roleBindPermissionGroup": {
  424. "post": {
  425. "description": "角色绑定权限组",
  426. "consumes": [
  427. "application/json"
  428. ],
  429. "produces": [
  430. "application/json"
  431. ],
  432. "tags": [
  433. "ADMIN-权限管理"
  434. ],
  435. "summary": "角色绑定权限组",
  436. "parameters": [
  437. {
  438. "type": "string",
  439. "description": "验证参数Bearer和token空格拼接",
  440. "name": "Authorization",
  441. "in": "header",
  442. "required": true
  443. },
  444. {
  445. "description": "请求参数",
  446. "name": "args",
  447. "in": "body",
  448. "required": true,
  449. "schema": {
  450. "$ref": "#/definitions/md.RoleBindPermissionGroupReq"
  451. }
  452. }
  453. ],
  454. "responses": {
  455. "200": {
  456. "description": "success",
  457. "schema": {
  458. "type": "string"
  459. }
  460. },
  461. "400": {
  462. "description": "具体错误",
  463. "schema": {
  464. "$ref": "#/definitions/md.Response"
  465. }
  466. }
  467. }
  468. }
  469. },
  470. "/api/role/roleList": {
  471. "get": {
  472. "description": "角色列表",
  473. "consumes": [
  474. "application/json"
  475. ],
  476. "produces": [
  477. "application/json"
  478. ],
  479. "tags": [
  480. "ADMIN-权限管理"
  481. ],
  482. "summary": "角色列表",
  483. "parameters": [
  484. {
  485. "type": "string",
  486. "description": "验证参数Bearer和token空格拼接",
  487. "name": "Authorization",
  488. "in": "header",
  489. "required": true
  490. }
  491. ],
  492. "responses": {
  493. "200": {
  494. "description": "具体看返回内容",
  495. "schema": {
  496. "type": "string"
  497. }
  498. },
  499. "400": {
  500. "description": "具体错误",
  501. "schema": {
  502. "$ref": "#/definitions/md.Response"
  503. }
  504. }
  505. }
  506. }
  507. },
  508. "/api/role/updateAdmin": {
  509. "post": {
  510. "description": "修改管理员信息",
  511. "consumes": [
  512. "application/json"
  513. ],
  514. "produces": [
  515. "application/json"
  516. ],
  517. "tags": [
  518. "ADMIN-权限管理"
  519. ],
  520. "summary": "修改管理员信息",
  521. "parameters": [
  522. {
  523. "type": "string",
  524. "description": "验证参数Bearer和token空格拼接",
  525. "name": "Authorization",
  526. "in": "header",
  527. "required": true
  528. },
  529. {
  530. "description": "请求参数",
  531. "name": "args",
  532. "in": "body",
  533. "required": true,
  534. "schema": {
  535. "$ref": "#/definitions/md.UpdateAdminReq"
  536. }
  537. }
  538. ],
  539. "responses": {
  540. "200": {
  541. "description": "success",
  542. "schema": {
  543. "type": "string"
  544. }
  545. },
  546. "400": {
  547. "description": "具体错误",
  548. "schema": {
  549. "$ref": "#/definitions/md.Response"
  550. }
  551. }
  552. }
  553. }
  554. },
  555. "/api/role/updateAdminState": {
  556. "post": {
  557. "description": "修改管理员状态",
  558. "consumes": [
  559. "application/json"
  560. ],
  561. "produces": [
  562. "application/json"
  563. ],
  564. "tags": [
  565. "ADMIN-权限管理"
  566. ],
  567. "summary": "修改管理员状态",
  568. "parameters": [
  569. {
  570. "type": "string",
  571. "description": "验证参数Bearer和token空格拼接",
  572. "name": "Authorization",
  573. "in": "header",
  574. "required": true
  575. },
  576. {
  577. "description": "请求参数",
  578. "name": "args",
  579. "in": "body",
  580. "required": true,
  581. "schema": {
  582. "$ref": "#/definitions/md.UpdateAdminStateReq"
  583. }
  584. }
  585. ],
  586. "responses": {
  587. "200": {
  588. "description": "success",
  589. "schema": {
  590. "type": "string"
  591. }
  592. },
  593. "400": {
  594. "description": "具体错误",
  595. "schema": {
  596. "$ref": "#/definitions/md.Response"
  597. }
  598. }
  599. }
  600. }
  601. },
  602. "/api/role/updateRole": {
  603. "post": {
  604. "description": "修改角色状态",
  605. "consumes": [
  606. "application/json"
  607. ],
  608. "produces": [
  609. "application/json"
  610. ],
  611. "tags": [
  612. "ADMIN-权限管理"
  613. ],
  614. "summary": "修改角色状态",
  615. "parameters": [
  616. {
  617. "type": "string",
  618. "description": "验证参数Bearer和token空格拼接",
  619. "name": "Authorization",
  620. "in": "header",
  621. "required": true
  622. },
  623. {
  624. "description": "请求参数",
  625. "name": "args",
  626. "in": "body",
  627. "required": true,
  628. "schema": {
  629. "$ref": "#/definitions/md.UpdateRoleStateReq"
  630. }
  631. }
  632. ],
  633. "responses": {
  634. "200": {
  635. "description": "success",
  636. "schema": {
  637. "type": "string"
  638. }
  639. },
  640. "400": {
  641. "description": "具体错误",
  642. "schema": {
  643. "$ref": "#/definitions/md.Response"
  644. }
  645. }
  646. }
  647. }
  648. }
  649. },
  650. "definitions": {
  651. "md.AddAdminReq": {
  652. "type": "object",
  653. "required": [
  654. "password",
  655. "username"
  656. ],
  657. "properties": {
  658. "memo": {
  659. "type": "string"
  660. },
  661. "password": {
  662. "type": "string"
  663. },
  664. "username": {
  665. "type": "string"
  666. }
  667. }
  668. },
  669. "md.AddRoleReq": {
  670. "type": "object",
  671. "required": [
  672. "memo",
  673. "name"
  674. ],
  675. "properties": {
  676. "memo": {
  677. "type": "string"
  678. },
  679. "name": {
  680. "type": "string"
  681. }
  682. }
  683. },
  684. "md.AdminListReq": {
  685. "type": "object",
  686. "properties": {
  687. "limit": {
  688. "type": "integer"
  689. },
  690. "page": {
  691. "type": "integer"
  692. },
  693. "state": {
  694. "type": "integer"
  695. },
  696. "username": {
  697. "type": "string"
  698. }
  699. }
  700. },
  701. "md.BindAdminRoleReq": {
  702. "type": "object",
  703. "required": [
  704. "id"
  705. ],
  706. "properties": {
  707. "id": {
  708. "type": "integer"
  709. },
  710. "role_ids": {
  711. "type": "array",
  712. "items": {
  713. "type": "integer"
  714. }
  715. }
  716. }
  717. },
  718. "md.LoginReq": {
  719. "type": "object",
  720. "required": [
  721. "password",
  722. "username"
  723. ],
  724. "properties": {
  725. "code": {
  726. "type": "string",
  727. "example": "验证码"
  728. },
  729. "password": {
  730. "type": "string",
  731. "example": "登录密码"
  732. },
  733. "username": {
  734. "type": "string",
  735. "example": "登录账号"
  736. }
  737. }
  738. },
  739. "md.LoginResponse": {
  740. "type": "object",
  741. "properties": {
  742. "token": {
  743. "type": "string"
  744. }
  745. }
  746. },
  747. "md.Response": {
  748. "type": "object",
  749. "properties": {
  750. "code": {
  751. "type": "string",
  752. "example": "响应码"
  753. },
  754. "data": {
  755. "description": "内容"
  756. },
  757. "msg": {
  758. "type": "string",
  759. "example": "具体错误原因"
  760. }
  761. }
  762. },
  763. "md.RoleBindPermissionGroupReq": {
  764. "type": "object",
  765. "required": [
  766. "role_id"
  767. ],
  768. "properties": {
  769. "permission_ids": {
  770. "type": "array",
  771. "items": {
  772. "type": "integer"
  773. }
  774. },
  775. "role_id": {
  776. "type": "integer"
  777. }
  778. }
  779. },
  780. "md.UpdateAdminReq": {
  781. "type": "object",
  782. "required": [
  783. "id",
  784. "password",
  785. "username"
  786. ],
  787. "properties": {
  788. "id": {
  789. "type": "integer"
  790. },
  791. "memo": {
  792. "type": "string"
  793. },
  794. "password": {
  795. "type": "string"
  796. },
  797. "username": {
  798. "type": "string"
  799. }
  800. }
  801. },
  802. "md.UpdateAdminStateReq": {
  803. "type": "object",
  804. "required": [
  805. "id",
  806. "state"
  807. ],
  808. "properties": {
  809. "id": {
  810. "type": "integer"
  811. },
  812. "state": {
  813. "type": "integer"
  814. }
  815. }
  816. },
  817. "md.UpdateRoleReq": {
  818. "type": "object",
  819. "required": [
  820. "memo",
  821. "name",
  822. "role_id"
  823. ],
  824. "properties": {
  825. "memo": {
  826. "type": "string"
  827. },
  828. "name": {
  829. "type": "string"
  830. },
  831. "role_id": {
  832. "type": "integer"
  833. }
  834. }
  835. },
  836. "md.UpdateRoleStateReq": {
  837. "type": "object",
  838. "required": [
  839. "role_id",
  840. "state"
  841. ],
  842. "properties": {
  843. "role_id": {
  844. "type": "integer"
  845. },
  846. "state": {
  847. "type": "integer"
  848. }
  849. }
  850. }
  851. },
  852. "securityDefinitions": {
  853. "MasterID": {
  854. "type": "apiKey",
  855. "name": "MasterID",
  856. "in": "header"
  857. }
  858. }
  859. }