广告平台(站长使用)
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_qualification.go 5.9 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. // MediumQualificationEnterprise
  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.MediumQualificationEnterpriseReq true "请求参数"
  17. // @Success 200 {object} md.MediumQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/mediumQualification/enterprise [POST]
  20. func MediumQualificationEnterprise(c *gin.Context) {
  21. var req md.MediumQualificationEnterpriseReq
  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.MediumQualificationEnterprise(c, 1, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // MediumQualificationEnterpriseAudit
  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.MediumQualificationEnterpriseAuditReq true "请求参数"
  41. // @Success 200 {string} "具体看返回内容"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/mediumQualification/enterprise/audit [POST]
  44. func MediumQualificationEnterpriseAudit(c *gin.Context) {
  45. var req md.MediumQualificationEnterpriseAuditReq
  46. err := c.ShouldBindJSON(&req)
  47. if err != nil {
  48. err = validate.HandleValidateErr(err)
  49. err1 := err.(e.E)
  50. e.OutErr(c, err1.Code, err1.Error())
  51. return
  52. }
  53. err = svc.MediumQualificationEnterpriseAudit(c, req)
  54. if err != nil {
  55. e.OutErr(c, 400, err)
  56. return
  57. }
  58. e.OutSuc(c, "success", nil)
  59. return
  60. }
  61. // MediumQualificationBank
  62. // @Summary 银行资质
  63. // @Tags 媒体资质------嘉俊
  64. // @Description 媒体资质-银行资质
  65. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  66. // @Accept json
  67. // @Produce json
  68. // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
  69. // @Success 200 {object} md.MediumQualificationBankRes "具体看返回内容 这是data里面的数据"
  70. // @Failure 400 {object} md.Response "具体错误"
  71. // @Router /api/mediumQualification/bank [POST]
  72. func MediumQualificationBank(c *gin.Context) {
  73. var req md.MediumQualificationEnterpriseReq
  74. err := c.ShouldBindJSON(&req)
  75. if err != nil {
  76. err = validate.HandleValidateErr(err)
  77. err1 := err.(e.E)
  78. e.OutErr(c, err1.Code, err1.Error())
  79. return
  80. }
  81. res := svc.MediumQualificationBank(c, req)
  82. e.OutSuc(c, res, nil)
  83. return
  84. }
  85. // MediumQualificationBankAudit
  86. // @Summary 银行资质审核
  87. // @Tags 媒体资质------嘉俊
  88. // @Description 媒体资质-银行资质审核
  89. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  90. // @Accept json
  91. // @Produce json
  92. // @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
  93. // @Success 200 {string} "具体看返回内容"
  94. // @Failure 400 {object} md.Response "具体错误"
  95. // @Router /api/mediumQualification/bank/audit [POST]
  96. func MediumQualificationBankAudit(c *gin.Context) {
  97. var req md.MediumQualificationEnterpriseAuditReq
  98. err := c.ShouldBindJSON(&req)
  99. if err != nil {
  100. err = validate.HandleValidateErr(err)
  101. err1 := err.(e.E)
  102. e.OutErr(c, err1.Code, err1.Error())
  103. return
  104. }
  105. err = svc.MediumQualificationBankAudit(c, req)
  106. if err != nil {
  107. e.OutErr(c, 400, err)
  108. return
  109. }
  110. e.OutSuc(c, "success", nil)
  111. return
  112. }
  113. // MediumQualificationContactInfo
  114. // @Summary 联系方式
  115. // @Tags 媒体资质------嘉俊
  116. // @Description 媒体资质-联系方式
  117. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  118. // @Accept json
  119. // @Produce json
  120. // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
  121. // @Success 200 {object} md.MediumQualificationContactRes "具体看返回内容 这是data里面的数据"
  122. // @Failure 400 {object} md.Response "具体错误"
  123. // @Router /api/mediumQualification/contact [POST]
  124. func MediumQualificationContactInfo(c *gin.Context) {
  125. var req md.MediumQualificationEnterpriseReq
  126. err := c.ShouldBindJSON(&req)
  127. if err != nil {
  128. err = validate.HandleValidateErr(err)
  129. err1 := err.(e.E)
  130. e.OutErr(c, err1.Code, err1.Error())
  131. return
  132. }
  133. res := svc.MediumQualificationContactInfo(c, req)
  134. e.OutSuc(c, res, nil)
  135. return
  136. }
  137. // MediumQualificationContactInfoAudit
  138. // @Summary 联系方式审核
  139. // @Tags 媒体资质------嘉俊
  140. // @Description 媒体资质-联系方式审核
  141. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  142. // @Accept json
  143. // @Produce json
  144. // @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
  145. // @Success 200 {string} "具体看返回内容"
  146. // @Failure 400 {object} md.Response "具体错误"
  147. // @Router /api/mediumQualification/contact/audit [POST]
  148. func MediumQualificationContactInfoAudit(c *gin.Context) {
  149. var req md.MediumQualificationEnterpriseAuditReq
  150. err := c.ShouldBindJSON(&req)
  151. if err != nil {
  152. err = validate.HandleValidateErr(err)
  153. err1 := err.(e.E)
  154. e.OutErr(c, err1.Code, err1.Error())
  155. return
  156. }
  157. err = svc.MediumQualificationContactInfoAudit(c, req)
  158. if err != nil {
  159. e.OutErr(c, 400, err)
  160. return
  161. }
  162. e.OutSuc(c, "success", nil)
  163. return
  164. }