广告平台(站长使用)
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

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