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

566 рядки
13 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.Response:
  62. properties:
  63. code:
  64. example: 响应码
  65. type: string
  66. data:
  67. description: 内容
  68. msg:
  69. example: 具体错误原因
  70. type: string
  71. type: object
  72. md.RoleBindPermissionGroupReq:
  73. properties:
  74. permission_ids:
  75. items:
  76. type: integer
  77. type: array
  78. role_id:
  79. type: integer
  80. required:
  81. - role_id
  82. type: object
  83. md.UpdateAdminReq:
  84. properties:
  85. adm_id:
  86. type: integer
  87. memo:
  88. type: string
  89. password:
  90. type: string
  91. username:
  92. type: string
  93. required:
  94. - adm_id
  95. - password
  96. - username
  97. type: object
  98. md.UpdateAdminStateReq:
  99. properties:
  100. adm_id:
  101. type: integer
  102. state:
  103. type: integer
  104. required:
  105. - adm_id
  106. - state
  107. type: object
  108. md.UpdateRoleReq:
  109. properties:
  110. memo:
  111. type: string
  112. name:
  113. type: string
  114. role_id:
  115. type: integer
  116. required:
  117. - memo
  118. - name
  119. - role_id
  120. type: object
  121. md.UpdateRoleStateReq:
  122. properties:
  123. role_id:
  124. type: integer
  125. state:
  126. type: integer
  127. required:
  128. - role_id
  129. - state
  130. type: object
  131. host: localhost:1001 or advertisement.dengbiao.top
  132. info:
  133. contact:
  134. email: 1239118001@qq.com
  135. name: dengbiao
  136. url: http://www.swagger.io/support
  137. description: 总站长后台接口
  138. license:
  139. name: Apache 2.0
  140. url: http://www.apache.org/licenses/LICENSE-2.0.html
  141. termsOfService: http://swagger.io/terms/
  142. title: 广告联盟-总站长平台
  143. version: "1.0"
  144. paths:
  145. /admin/login:
  146. post:
  147. consumes:
  148. - application/json
  149. description: 登入
  150. parameters:
  151. - description: 用户名密码
  152. in: body
  153. name: req
  154. required: true
  155. schema:
  156. $ref: '#/definitions/md.LoginReq'
  157. produces:
  158. - application/json
  159. responses:
  160. "200":
  161. description: token
  162. schema:
  163. $ref: '#/definitions/md.LoginResponse'
  164. "400":
  165. description: 具体错误
  166. schema:
  167. $ref: '#/definitions/md.Response'
  168. summary: 登陆
  169. tags:
  170. - 登录注册
  171. /role/addAdmin:
  172. post:
  173. consumes:
  174. - application/json
  175. description: 权限管理-新增管理员
  176. parameters:
  177. - description: 验证参数Bearer和token空格拼接
  178. in: header
  179. name: Authorization
  180. required: true
  181. type: string
  182. - description: 请求参数
  183. in: body
  184. name: args
  185. required: true
  186. schema:
  187. $ref: '#/definitions/md.AddAdminReq'
  188. produces:
  189. - application/json
  190. responses:
  191. "200":
  192. description: success
  193. schema:
  194. type: string
  195. "400":
  196. description: 具体错误
  197. schema:
  198. $ref: '#/definitions/md.Response'
  199. summary: 新增管理员
  200. tags:
  201. - 权限管理
  202. /role/addRole:
  203. post:
  204. consumes:
  205. - application/json
  206. description: 权限管理-添加角色
  207. parameters:
  208. - description: 验证参数Bearer和token空格拼接
  209. in: header
  210. name: Authorization
  211. required: true
  212. type: string
  213. - description: 请求参数
  214. in: body
  215. name: args
  216. required: true
  217. schema:
  218. $ref: '#/definitions/md.AddRoleReq'
  219. produces:
  220. - application/json
  221. responses:
  222. "200":
  223. description: success
  224. schema:
  225. type: string
  226. "400":
  227. description: 具体错误
  228. schema:
  229. $ref: '#/definitions/md.Response'
  230. summary: 添加角色
  231. tags:
  232. - 权限管理
  233. /role/adminInfo:
  234. get:
  235. consumes:
  236. - application/json
  237. description: 权限管理-管理员信息
  238. parameters:
  239. - description: 验证参数Bearer和token空格拼接
  240. in: header
  241. name: Authorization
  242. required: true
  243. type: string
  244. - description: 管理员id
  245. in: query
  246. name: adm_id
  247. required: true
  248. type: string
  249. produces:
  250. - application/json
  251. responses:
  252. "200":
  253. description: 具体看返回内容
  254. schema:
  255. type: string
  256. "400":
  257. description: 具体错误
  258. schema:
  259. $ref: '#/definitions/md.Response'
  260. summary: 管理员信息
  261. tags:
  262. - 权限管理
  263. /role/adminList:
  264. post:
  265. consumes:
  266. - application/json
  267. description: 权限管理-管理员列表
  268. parameters:
  269. - description: 验证参数Bearer和token空格拼接
  270. in: header
  271. name: Authorization
  272. required: true
  273. type: string
  274. - description: 请求参数
  275. in: body
  276. name: args
  277. required: true
  278. schema:
  279. $ref: '#/definitions/md.AdminListReq'
  280. produces:
  281. - application/json
  282. responses:
  283. "200":
  284. description: 具体看返回内容
  285. schema:
  286. type: string
  287. "400":
  288. description: 具体错误
  289. schema:
  290. $ref: '#/definitions/md.Response'
  291. summary: 管理员列表
  292. tags:
  293. - 权限管理
  294. /role/bindAdminRole/:
  295. post:
  296. consumes:
  297. - application/json
  298. description: 权限管理-管理员绑定角色
  299. parameters:
  300. - description: 验证参数Bearer和token空格拼接
  301. in: header
  302. name: Authorization
  303. required: true
  304. type: string
  305. - description: 请求参数
  306. in: body
  307. name: args
  308. required: true
  309. schema:
  310. $ref: '#/definitions/md.BindAdminRoleReq'
  311. produces:
  312. - application/json
  313. responses:
  314. "200":
  315. description: success
  316. schema:
  317. type: string
  318. "400":
  319. description: 具体错误
  320. schema:
  321. $ref: '#/definitions/md.Response'
  322. summary: 管理员绑定角色
  323. tags:
  324. - 权限管理
  325. /role/deleteAdmin/{$adm_id}:
  326. delete:
  327. consumes:
  328. - application/json
  329. description: 权限管理-删除管理员
  330. parameters:
  331. - description: 验证参数Bearer和token空格拼接
  332. in: header
  333. name: Authorization
  334. required: true
  335. type: string
  336. produces:
  337. - application/json
  338. responses:
  339. "200":
  340. description: success
  341. schema:
  342. type: string
  343. "400":
  344. description: 具体错误
  345. schema:
  346. $ref: '#/definitions/md.Response'
  347. summary: 删除管理员
  348. tags:
  349. - 权限管理
  350. /role/deleteRole/{$id}:
  351. delete:
  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.UpdateRoleStateReq'
  367. produces:
  368. - application/json
  369. responses:
  370. "200":
  371. description: success
  372. schema:
  373. type: string
  374. "400":
  375. description: 具体错误
  376. schema:
  377. $ref: '#/definitions/md.Response'
  378. summary: 删除角色
  379. tags:
  380. - 权限管理
  381. /role/permissionGroupList:
  382. get:
  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: 管理员id
  393. in: query
  394. name: adm_id
  395. required: true
  396. type: string
  397. produces:
  398. - application/json
  399. responses:
  400. "200":
  401. description: 具体看返回内容
  402. schema:
  403. type: string
  404. "400":
  405. description: 具体错误
  406. schema:
  407. $ref: '#/definitions/md.Response'
  408. summary: 权限组列表
  409. tags:
  410. - 权限管理
  411. /role/roleBindPermissionGroup:
  412. post:
  413. consumes:
  414. - application/json
  415. description: 权限管理-角色绑定权限组
  416. parameters:
  417. - description: 验证参数Bearer和token空格拼接
  418. in: header
  419. name: Authorization
  420. required: true
  421. type: string
  422. - description: 请求参数
  423. in: body
  424. name: args
  425. required: true
  426. schema:
  427. $ref: '#/definitions/md.RoleBindPermissionGroupReq'
  428. produces:
  429. - application/json
  430. responses:
  431. "200":
  432. description: success
  433. schema:
  434. type: string
  435. "400":
  436. description: 具体错误
  437. schema:
  438. $ref: '#/definitions/md.Response'
  439. summary: 角色绑定权限组
  440. tags:
  441. - 权限管理
  442. /role/roleList:
  443. get:
  444. consumes:
  445. - application/json
  446. description: 权限管理-角色列表
  447. parameters:
  448. - description: 验证参数Bearer和token空格拼接
  449. in: header
  450. name: Authorization
  451. required: true
  452. type: string
  453. produces:
  454. - application/json
  455. responses:
  456. "200":
  457. description: 具体看返回内容
  458. schema:
  459. type: string
  460. "400":
  461. description: 具体错误
  462. schema:
  463. $ref: '#/definitions/md.Response'
  464. summary: 角色列表
  465. tags:
  466. - 权限管理
  467. /role/updateAdmin:
  468. post:
  469. consumes:
  470. - application/json
  471. description: 权限管理-修改管理员信息
  472. parameters:
  473. - description: 验证参数Bearer和token空格拼接
  474. in: header
  475. name: Authorization
  476. required: true
  477. type: string
  478. - description: 请求参数
  479. in: body
  480. name: args
  481. required: true
  482. schema:
  483. $ref: '#/definitions/md.UpdateAdminReq'
  484. produces:
  485. - application/json
  486. responses:
  487. "200":
  488. description: success
  489. schema:
  490. type: string
  491. "400":
  492. description: 具体错误
  493. schema:
  494. $ref: '#/definitions/md.Response'
  495. summary: 修改管理员信息
  496. tags:
  497. - 权限管理
  498. /role/updateAdminState:
  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.UpdateAdminStateReq'
  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/updateRole:
  530. post:
  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. - description: 请求参数
  541. in: body
  542. name: args
  543. required: true
  544. schema:
  545. $ref: '#/definitions/md.UpdateRoleStateReq'
  546. produces:
  547. - application/json
  548. responses:
  549. "200":
  550. description: success
  551. schema:
  552. type: string
  553. "400":
  554. description: 具体错误
  555. schema:
  556. $ref: '#/definitions/md.Response'
  557. summary: 修改角色状态
  558. tags:
  559. - 权限管理
  560. securityDefinitions:
  561. MasterID:
  562. in: header
  563. name: MasterID
  564. type: apiKey
  565. swagger: "2.0"