广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hdl_medium_agent.go 4.5 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. package hdl
  2. import (
  3. "applet/app/e"
  4. "applet/app/lib/validate"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "github.com/gin-gonic/gin"
  8. )
  9. // AgentList
  10. // @Summary 代理列表
  11. // @Tags 关联中心------嘉俊
  12. // @Description 关联中心-代理列表
  13. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  14. // @Accept json
  15. // @Produce json
  16. // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
  17. // @Success 200 {object} md.AgentQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/mediumCenter/agent/list [POST]
  20. func AgentList(c *gin.Context) {
  21. var req md.AgentQualificationEnterpriseReq
  22. err := c.ShouldBindJSON(&req)
  23. if err != nil {
  24. err = validate.HandleValidateErr(err)
  25. err1 := err.(e.E)
  26. e.OutErr(c, err1.Code, err1.Error())
  27. return
  28. }
  29. res := svc.AgentQualificationEnterprise(c, 0, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // AgentBindMediumList
  34. // @Summary 代理绑定媒体列表
  35. // @Tags 关联中心------嘉俊
  36. // @Description 关联中心-代理绑定媒体列表
  37. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  38. // @Accept json
  39. // @Produce json
  40. // @Param args body md.MediumListReq true "请求参数"
  41. // @Success 200 {object} md.MediumListRes "具体看返回内容 这是data里面的数据"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/mediumCenter/agent/bind/medium/list [POST]
  44. func AgentBindMediumList(c *gin.Context) {
  45. svc.AgentBindMediumList(c)
  46. return
  47. }
  48. // MediumList
  49. // @Summary 媒体列表
  50. // @Tags 关联中心------嘉俊
  51. // @Description 关联中心-媒体列表
  52. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  53. // @Accept json
  54. // @Produce json
  55. // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
  56. // @Success 200 {object} md.MediumQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
  57. // @Failure 400 {object} md.Response "具体错误"
  58. // @Router /api/mediumCenter/medium/list [POST]
  59. func MediumList(c *gin.Context) {
  60. var req md.MediumQualificationEnterpriseReq
  61. err := c.ShouldBindJSON(&req)
  62. if err != nil {
  63. err = validate.HandleValidateErr(err)
  64. err1 := err.(e.E)
  65. e.OutErr(c, err1.Code, err1.Error())
  66. return
  67. }
  68. res := svc.MediumQualificationEnterprise(c, 0, req)
  69. e.OutSuc(c, res, nil)
  70. return
  71. }
  72. // MediumBindAgentList
  73. // @Summary 媒体绑定代理列表
  74. // @Tags 关联中心------嘉俊
  75. // @Description 关联中心-媒体绑定代理列表
  76. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  77. // @Accept json
  78. // @Produce json
  79. // @Param args body md.MediumListReq true "请求参数"
  80. // @Success 200 {object} md.MediumListRes "具体看返回内容 这是data里面的数据"
  81. // @Failure 400 {object} md.Response "具体错误"
  82. // @Router /api/mediumCenter/medium/bind/agent/list [POST]
  83. func MediumBindAgentList(c *gin.Context) {
  84. svc.MediumBindAgentList(c)
  85. return
  86. }
  87. // MediumBindAgentSave
  88. // @Summary 媒体绑定代理操作
  89. // @Tags 关联中心------嘉俊
  90. // @Description 关联中心-媒体绑定代理操作
  91. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  92. // @Accept json
  93. // @Produce json
  94. // @Param args body md.MediumListSaveReq true "请求参数"
  95. // @Success 200 {string} "具体看返回内容 "
  96. // @Failure 400 {object} md.Response "具体错误"
  97. // @Router /api/mediumCenter/medium/bind/agent/save [POST]
  98. func MediumBindAgentSave(c *gin.Context) {
  99. svc.MediumBindAgentSave(c)
  100. return
  101. }
  102. // MediumBindAgentDel
  103. // @Summary 媒体绑定代理删除
  104. // @Tags 关联中心------嘉俊
  105. // @Description 关联中心-媒体绑定代理删除
  106. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  107. // @Accept json
  108. // @Produce json
  109. // @Param args body md.MediumListDelReq true "请求参数"
  110. // @Success 200 {string} "具体看返回内容 "
  111. // @Failure 400 {object} md.Response "具体错误"
  112. // @Router /api/mediumCenter/medium/bind/agent/del [POST]
  113. func MediumBindAgentDel(c *gin.Context) {
  114. svc.MediumBindAgentDel(c)
  115. return
  116. }