广告平台(站长下代理使用)
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

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