广告平台(站长使用)
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

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