广告平台(站长使用)
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.
 
 
 
 
 

653 rader
15 KiB

  1. definitions:
  2. md.AddAdminReq:
  3. properties:
  4. memo:
  5. type: string
  6. password:
  7. type: string
  8. username:
  9. type: string
  10. required:
  11. - password
  12. - username
  13. type: object
  14. md.AddRoleReq:
  15. properties:
  16. memo:
  17. type: string
  18. name:
  19. type: string
  20. required:
  21. - memo
  22. - name
  23. type: object
  24. md.AdminListReq:
  25. properties:
  26. limit:
  27. type: integer
  28. page:
  29. type: integer
  30. state:
  31. type: integer
  32. username:
  33. type: string
  34. type: object
  35. md.BindAdminRoleReq:
  36. properties:
  37. adm_id:
  38. type: integer
  39. role_ids:
  40. items:
  41. type: integer
  42. type: array
  43. required:
  44. - adm_id
  45. type: object
  46. md.LoginReq:
  47. properties:
  48. code:
  49. example: 验证码
  50. type: string
  51. password:
  52. example: 登录密码
  53. type: string
  54. username:
  55. example: 登录账号
  56. type: string
  57. required:
  58. - password
  59. - username
  60. type: object
  61. md.LoginResponse:
  62. properties:
  63. token:
  64. type: string
  65. type: object
  66. md.RegisterForAgentReq:
  67. properties:
  68. code:
  69. example: 验证码
  70. type: string
  71. password:
  72. example: 登录密码
  73. type: string
  74. phone:
  75. example: 登录账号
  76. type: string
  77. required:
  78. - password
  79. - phone
  80. type: object
  81. md.RegisterForMediumReq:
  82. properties:
  83. code:
  84. example: 验证码
  85. type: string
  86. password:
  87. example: 登录密码
  88. type: string
  89. phone:
  90. example: 登录账号
  91. type: string
  92. required:
  93. - password
  94. - phone
  95. type: object
  96. md.Response:
  97. properties:
  98. code:
  99. example: 响应码
  100. type: string
  101. data:
  102. description: 内容
  103. msg:
  104. example: 具体错误原因
  105. type: string
  106. type: object
  107. md.RoleBindPermissionGroupReq:
  108. properties:
  109. permission_ids:
  110. items:
  111. type: integer
  112. type: array
  113. role_id:
  114. type: integer
  115. required:
  116. - role_id
  117. type: object
  118. md.UpdateAdminReq:
  119. properties:
  120. adm_id:
  121. type: integer
  122. memo:
  123. type: string
  124. password:
  125. type: string
  126. username:
  127. type: string
  128. required:
  129. - adm_id
  130. - password
  131. - username
  132. type: object
  133. md.UpdateAdminStateReq:
  134. properties:
  135. adm_id:
  136. type: integer
  137. state:
  138. type: integer
  139. required:
  140. - adm_id
  141. - state
  142. type: object
  143. md.UpdateRoleReq:
  144. properties:
  145. memo:
  146. type: string
  147. name:
  148. type: string
  149. role_id:
  150. type: integer
  151. required:
  152. - memo
  153. - name
  154. - role_id
  155. type: object
  156. md.UpdateRoleStateReq:
  157. properties:
  158. role_id:
  159. type: integer
  160. state:
  161. type: integer
  162. required:
  163. - role_id
  164. - state
  165. type: object
  166. host: localhost:1002 or xxxx.advertisement.dengbiao.top
  167. info:
  168. contact:
  169. email: 1239118001@qq.com
  170. name: dengbiao
  171. url: http://www.swagger.io/support
  172. description: 站长后台接口
  173. license:
  174. name: Apache 2.0
  175. url: http://www.apache.org/licenses/LICENSE-2.0.html
  176. termsOfService: http://swagger.io/terms/
  177. title: 广告联盟-站长平台
  178. version: "1.0"
  179. paths:
  180. /login:
  181. post:
  182. consumes:
  183. - application/json
  184. description: 登入
  185. parameters:
  186. - description: 用户名密码
  187. in: body
  188. name: req
  189. required: true
  190. schema:
  191. $ref: '#/definitions/md.LoginReq'
  192. produces:
  193. - application/json
  194. responses:
  195. "200":
  196. description: token
  197. schema:
  198. $ref: '#/definitions/md.LoginResponse'
  199. "400":
  200. description: 具体错误
  201. schema:
  202. $ref: '#/definitions/md.Response'
  203. summary: 登陆
  204. tags:
  205. - 登录
  206. /registerForAgent:
  207. post:
  208. consumes:
  209. - application/json
  210. description: 注册模块-渠道代理注册
  211. parameters:
  212. - description: 用户名密码
  213. in: body
  214. name: req
  215. required: true
  216. schema:
  217. $ref: '#/definitions/md.RegisterForAgentReq'
  218. produces:
  219. - application/json
  220. responses:
  221. "200":
  222. description: success
  223. schema:
  224. type: string
  225. "400":
  226. description: 具体错误
  227. schema:
  228. $ref: '#/definitions/md.Response'
  229. summary: 渠道代理注册
  230. tags:
  231. - 注册模块
  232. /registerForMedium:
  233. post:
  234. consumes:
  235. - application/json
  236. description: 注册模块-媒体注册
  237. parameters:
  238. - description: 用户名密码
  239. in: body
  240. name: req
  241. required: true
  242. schema:
  243. $ref: '#/definitions/md.RegisterForMediumReq'
  244. produces:
  245. - application/json
  246. responses:
  247. "200":
  248. description: success
  249. schema:
  250. type: string
  251. "400":
  252. description: 具体错误
  253. schema:
  254. $ref: '#/definitions/md.Response'
  255. summary: 媒体注册
  256. tags:
  257. - 注册模块
  258. /role/addAdmin:
  259. post:
  260. consumes:
  261. - application/json
  262. description: 权限管理-新增管理员
  263. parameters:
  264. - description: 验证参数Bearer和token空格拼接
  265. in: header
  266. name: Authorization
  267. required: true
  268. type: string
  269. - description: 请求参数
  270. in: body
  271. name: args
  272. required: true
  273. schema:
  274. $ref: '#/definitions/md.AddAdminReq'
  275. produces:
  276. - application/json
  277. responses:
  278. "200":
  279. description: success
  280. schema:
  281. type: string
  282. "400":
  283. description: 具体错误
  284. schema:
  285. $ref: '#/definitions/md.Response'
  286. summary: 新增管理员
  287. tags:
  288. - 权限管理
  289. /role/addRole:
  290. post:
  291. consumes:
  292. - application/json
  293. description: 权限管理-添加角色
  294. parameters:
  295. - description: 验证参数Bearer和token空格拼接
  296. in: header
  297. name: Authorization
  298. required: true
  299. type: string
  300. - description: 请求参数
  301. in: body
  302. name: args
  303. required: true
  304. schema:
  305. $ref: '#/definitions/md.AddRoleReq'
  306. produces:
  307. - application/json
  308. responses:
  309. "200":
  310. description: success
  311. schema:
  312. type: string
  313. "400":
  314. description: 具体错误
  315. schema:
  316. $ref: '#/definitions/md.Response'
  317. summary: 添加角色
  318. tags:
  319. - 权限管理
  320. /role/adminInfo:
  321. get:
  322. consumes:
  323. - application/json
  324. description: 权限管理-管理员信息
  325. parameters:
  326. - description: 验证参数Bearer和token空格拼接
  327. in: header
  328. name: Authorization
  329. required: true
  330. type: string
  331. - description: 管理员id
  332. in: query
  333. name: adm_id
  334. required: true
  335. type: string
  336. produces:
  337. - application/json
  338. responses:
  339. "200":
  340. description: 具体看返回内容
  341. schema:
  342. type: string
  343. "400":
  344. description: 具体错误
  345. schema:
  346. $ref: '#/definitions/md.Response'
  347. summary: 管理员信息
  348. tags:
  349. - 权限管理
  350. /role/adminList:
  351. post:
  352. consumes:
  353. - application/json
  354. description: 权限管理-管理员列表
  355. parameters:
  356. - description: 验证参数Bearer和token空格拼接
  357. in: header
  358. name: Authorization
  359. required: true
  360. type: string
  361. - description: 请求参数
  362. in: body
  363. name: args
  364. required: true
  365. schema:
  366. $ref: '#/definitions/md.AdminListReq'
  367. produces:
  368. - application/json
  369. responses:
  370. "200":
  371. description: 具体看返回内容
  372. schema:
  373. type: string
  374. "400":
  375. description: 具体错误
  376. schema:
  377. $ref: '#/definitions/md.Response'
  378. summary: 管理员列表
  379. tags:
  380. - 权限管理
  381. /role/bindAdminRole/:
  382. post:
  383. consumes:
  384. - application/json
  385. description: 权限管理-管理员绑定角色
  386. parameters:
  387. - description: 验证参数Bearer和token空格拼接
  388. in: header
  389. name: Authorization
  390. required: true
  391. type: string
  392. - description: 请求参数
  393. in: body
  394. name: args
  395. required: true
  396. schema:
  397. $ref: '#/definitions/md.BindAdminRoleReq'
  398. produces:
  399. - application/json
  400. responses:
  401. "200":
  402. description: success
  403. schema:
  404. type: string
  405. "400":
  406. description: 具体错误
  407. schema:
  408. $ref: '#/definitions/md.Response'
  409. summary: 管理员绑定角色
  410. tags:
  411. - 权限管理
  412. /role/deleteAdmin/{$adm_id}:
  413. delete:
  414. consumes:
  415. - application/json
  416. description: 权限管理-删除管理员
  417. parameters:
  418. - description: 验证参数Bearer和token空格拼接
  419. in: header
  420. name: Authorization
  421. required: true
  422. type: string
  423. produces:
  424. - application/json
  425. responses:
  426. "200":
  427. description: success
  428. schema:
  429. type: string
  430. "400":
  431. description: 具体错误
  432. schema:
  433. $ref: '#/definitions/md.Response'
  434. summary: 删除管理员
  435. tags:
  436. - 权限管理
  437. /role/deleteRole/{$id}:
  438. delete:
  439. consumes:
  440. - application/json
  441. description: 权限管理-删除角色
  442. parameters:
  443. - description: 验证参数Bearer和token空格拼接
  444. in: header
  445. name: Authorization
  446. required: true
  447. type: string
  448. - description: 请求参数
  449. in: body
  450. name: args
  451. required: true
  452. schema:
  453. $ref: '#/definitions/md.UpdateRoleStateReq'
  454. produces:
  455. - application/json
  456. responses:
  457. "200":
  458. description: success
  459. schema:
  460. type: string
  461. "400":
  462. description: 具体错误
  463. schema:
  464. $ref: '#/definitions/md.Response'
  465. summary: 删除角色
  466. tags:
  467. - 权限管理
  468. /role/permissionGroupList:
  469. get:
  470. consumes:
  471. - application/json
  472. description: 权限管理-权限组列表
  473. parameters:
  474. - description: 验证参数Bearer和token空格拼接
  475. in: header
  476. name: Authorization
  477. required: true
  478. type: string
  479. - description: 管理员id
  480. in: query
  481. name: adm_id
  482. required: true
  483. type: string
  484. produces:
  485. - application/json
  486. responses:
  487. "200":
  488. description: 具体看返回内容
  489. schema:
  490. type: string
  491. "400":
  492. description: 具体错误
  493. schema:
  494. $ref: '#/definitions/md.Response'
  495. summary: 权限组列表
  496. tags:
  497. - 权限管理
  498. /role/roleBindPermissionGroup:
  499. post:
  500. consumes:
  501. - application/json
  502. description: 权限管理-角色绑定权限组
  503. parameters:
  504. - description: 验证参数Bearer和token空格拼接
  505. in: header
  506. name: Authorization
  507. required: true
  508. type: string
  509. - description: 请求参数
  510. in: body
  511. name: args
  512. required: true
  513. schema:
  514. $ref: '#/definitions/md.RoleBindPermissionGroupReq'
  515. produces:
  516. - application/json
  517. responses:
  518. "200":
  519. description: success
  520. schema:
  521. type: string
  522. "400":
  523. description: 具体错误
  524. schema:
  525. $ref: '#/definitions/md.Response'
  526. summary: 角色绑定权限组
  527. tags:
  528. - 权限管理
  529. /role/roleList:
  530. get:
  531. consumes:
  532. - application/json
  533. description: 权限管理-角色列表
  534. parameters:
  535. - description: 验证参数Bearer和token空格拼接
  536. in: header
  537. name: Authorization
  538. required: true
  539. type: string
  540. produces:
  541. - application/json
  542. responses:
  543. "200":
  544. description: 具体看返回内容
  545. schema:
  546. type: string
  547. "400":
  548. description: 具体错误
  549. schema:
  550. $ref: '#/definitions/md.Response'
  551. summary: 角色列表
  552. tags:
  553. - 权限管理
  554. /role/updateAdmin:
  555. post:
  556. consumes:
  557. - application/json
  558. description: 权限管理-修改管理员信息
  559. parameters:
  560. - description: 验证参数Bearer和token空格拼接
  561. in: header
  562. name: Authorization
  563. required: true
  564. type: string
  565. - description: 请求参数
  566. in: body
  567. name: args
  568. required: true
  569. schema:
  570. $ref: '#/definitions/md.UpdateAdminReq'
  571. produces:
  572. - application/json
  573. responses:
  574. "200":
  575. description: success
  576. schema:
  577. type: string
  578. "400":
  579. description: 具体错误
  580. schema:
  581. $ref: '#/definitions/md.Response'
  582. summary: 修改管理员信息
  583. tags:
  584. - 权限管理
  585. /role/updateAdminState:
  586. post:
  587. consumes:
  588. - application/json
  589. description: 权限管理-修改管理员状态
  590. parameters:
  591. - description: 验证参数Bearer和token空格拼接
  592. in: header
  593. name: Authorization
  594. required: true
  595. type: string
  596. - description: 请求参数
  597. in: body
  598. name: args
  599. required: true
  600. schema:
  601. $ref: '#/definitions/md.UpdateAdminStateReq'
  602. produces:
  603. - application/json
  604. responses:
  605. "200":
  606. description: success
  607. schema:
  608. type: string
  609. "400":
  610. description: 具体错误
  611. schema:
  612. $ref: '#/definitions/md.Response'
  613. summary: 修改管理员状态
  614. tags:
  615. - 权限管理
  616. /role/updateRole:
  617. post:
  618. consumes:
  619. - application/json
  620. description: 权限管理-修改角色状态
  621. parameters:
  622. - description: 验证参数Bearer和token空格拼接
  623. in: header
  624. name: Authorization
  625. required: true
  626. type: string
  627. - description: 请求参数
  628. in: body
  629. name: args
  630. required: true
  631. schema:
  632. $ref: '#/definitions/md.UpdateRoleStateReq'
  633. produces:
  634. - application/json
  635. responses:
  636. "200":
  637. description: success
  638. schema:
  639. type: string
  640. "400":
  641. description: 具体错误
  642. schema:
  643. $ref: '#/definitions/md.Response'
  644. summary: 修改角色状态
  645. tags:
  646. - 权限管理
  647. securityDefinitions:
  648. MasterID:
  649. in: header
  650. name: MasterID
  651. type: apiKey
  652. swagger: "2.0"