广告平台(站长使用)
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.
 
 
 
 
 

186 lines
6.4 KiB

  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. // QualificationSelectBase
  10. // @Summary 认证下拉框选择内容
  11. // @Tags 资质认证------嘉俊
  12. // @Description 资质认证-认证下拉框选择内容
  13. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  14. // @Accept json
  15. // @Produce json
  16. // @Success 200 {string} "具体看返回内容"
  17. // @Failure 400 {object} md.Response "具体错误"
  18. // @Router /api/qualification/select/base [GET]
  19. func QualificationSelectBase(c *gin.Context) {
  20. svc.QualificationSelectBase(c)
  21. }
  22. // AgentQualificationEnterprise
  23. // @Summary 主体资质
  24. // @Tags 渠道资质------嘉俊
  25. // @Description 渠道资质-主体资质
  26. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  27. // @Accept json
  28. // @Produce json
  29. // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
  30. // @Success 200 {object} md.AgentQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
  31. // @Failure 400 {object} md.Response "具体错误"
  32. // @Router /api/agentQualification/enterprise [POST]
  33. func AgentQualificationEnterprise(c *gin.Context) {
  34. var req md.AgentQualificationEnterpriseReq
  35. err := c.ShouldBindJSON(&req)
  36. if err != nil {
  37. err = validate.HandleValidateErr(err)
  38. err1 := err.(e.E)
  39. e.OutErr(c, err1.Code, err1.Error())
  40. return
  41. }
  42. res := svc.AgentQualificationEnterprise(c, 1, req)
  43. e.OutSuc(c, res, nil)
  44. return
  45. }
  46. // AgentQualificationEnterpriseAudit
  47. // @Summary 主体资质审核
  48. // @Tags 渠道资质------嘉俊
  49. // @Description 渠道资质-主体资质审核
  50. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  51. // @Accept json
  52. // @Produce json
  53. // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
  54. // @Success 200 {string} "具体看返回内容"
  55. // @Failure 400 {object} md.Response "具体错误"
  56. // @Router /api/agentQualification/enterprise/audit [POST]
  57. func AgentQualificationEnterpriseAudit(c *gin.Context) {
  58. var req md.AgentQualificationEnterpriseAuditReq
  59. err := c.ShouldBindJSON(&req)
  60. if err != nil {
  61. err = validate.HandleValidateErr(err)
  62. err1 := err.(e.E)
  63. e.OutErr(c, err1.Code, err1.Error())
  64. return
  65. }
  66. err = svc.AgentQualificationEnterpriseAudit(c, req)
  67. if err != nil {
  68. e.OutErr(c, 400, err)
  69. return
  70. }
  71. e.OutSuc(c, "success", nil)
  72. return
  73. }
  74. // AgentQualificationBank
  75. // @Summary 银行资质
  76. // @Tags 渠道资质------嘉俊
  77. // @Description 渠道资质-银行资质
  78. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  79. // @Accept json
  80. // @Produce json
  81. // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
  82. // @Success 200 {object} md.AgentQualificationBankRes "具体看返回内容 这是data里面的数据"
  83. // @Failure 400 {object} md.Response "具体错误"
  84. // @Router /api/agentQualification/bank [POST]
  85. func AgentQualificationBank(c *gin.Context) {
  86. var req md.AgentQualificationEnterpriseReq
  87. err := c.ShouldBindJSON(&req)
  88. if err != nil {
  89. err = validate.HandleValidateErr(err)
  90. err1 := err.(e.E)
  91. e.OutErr(c, err1.Code, err1.Error())
  92. return
  93. }
  94. res := svc.AgentQualificationBank(c, req)
  95. e.OutSuc(c, res, nil)
  96. return
  97. }
  98. // AgentQualificationBankAudit
  99. // @Summary 银行资质审核
  100. // @Tags 渠道资质------嘉俊
  101. // @Description 渠道资质-银行资质审核
  102. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  103. // @Accept json
  104. // @Produce json
  105. // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
  106. // @Success 200 {string} "具体看返回内容"
  107. // @Failure 400 {object} md.Response "具体错误"
  108. // @Router /api/agentQualification/bank/audit [POST]
  109. func AgentQualificationBankAudit(c *gin.Context) {
  110. var req md.AgentQualificationEnterpriseAuditReq
  111. err := c.ShouldBindJSON(&req)
  112. if err != nil {
  113. err = validate.HandleValidateErr(err)
  114. err1 := err.(e.E)
  115. e.OutErr(c, err1.Code, err1.Error())
  116. return
  117. }
  118. err = svc.AgentQualificationBankAudit(c, req)
  119. if err != nil {
  120. e.OutErr(c, 400, err)
  121. return
  122. }
  123. e.OutSuc(c, "success", nil)
  124. return
  125. }
  126. // AgentQualificationContactInfo
  127. // @Summary 联系方式
  128. // @Tags 渠道资质------嘉俊
  129. // @Description 渠道资质-联系方式
  130. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  131. // @Accept json
  132. // @Produce json
  133. // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
  134. // @Success 200 {object} md.AgentQualificationContactRes "具体看返回内容 这是data里面的数据"
  135. // @Failure 400 {object} md.Response "具体错误"
  136. // @Router /api/agentQualification/contact [POST]
  137. func AgentQualificationContactInfo(c *gin.Context) {
  138. var req md.AgentQualificationEnterpriseReq
  139. err := c.ShouldBindJSON(&req)
  140. if err != nil {
  141. err = validate.HandleValidateErr(err)
  142. err1 := err.(e.E)
  143. e.OutErr(c, err1.Code, err1.Error())
  144. return
  145. }
  146. res := svc.AgentQualificationContactInfo(c, req)
  147. e.OutSuc(c, res, nil)
  148. return
  149. }
  150. // AgentQualificationContactInfoAudit
  151. // @Summary 联系方式审核
  152. // @Tags 渠道资质------嘉俊
  153. // @Description 渠道资质-联系方式审核
  154. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  155. // @Accept json
  156. // @Produce json
  157. // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
  158. // @Success 200 {string} "具体看返回内容"
  159. // @Failure 400 {object} md.Response "具体错误"
  160. // @Router /api/agentQualification/contact/audit [POST]
  161. func AgentQualificationContactInfoAudit(c *gin.Context) {
  162. var req md.AgentQualificationEnterpriseAuditReq
  163. err := c.ShouldBindJSON(&req)
  164. if err != nil {
  165. err = validate.HandleValidateErr(err)
  166. err1 := err.(e.E)
  167. e.OutErr(c, err1.Code, err1.Error())
  168. return
  169. }
  170. err = svc.AgentQualificationContactInfoAudit(c, req)
  171. if err != nil {
  172. e.OutErr(c, 400, err)
  173. return
  174. }
  175. e.OutSuc(c, "success", nil)
  176. return
  177. }