广告平台(媒体使用)
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

hdl_qualification.go 3.9 KiB

3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
3 meses atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. // QualificationInfo
  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/account/qualification/info [GET]
  19. func QualificationInfo(c *gin.Context) {
  20. svc.QualificationInfo(c)
  21. }
  22. // QualificationSelectBase
  23. // @Summary 认证下拉框选择内容
  24. // @Tags 账号中心------嘉俊
  25. // @Description 资质认证-认证下拉框选择内容
  26. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  27. // @Accept json
  28. // @Produce json
  29. // @Success 200 {string} "具体看返回内容"
  30. // @Failure 400 {object} md.Response "具体错误"
  31. // @Router /api/account/qualification/select/base [GET]
  32. func QualificationSelectBase(c *gin.Context) {
  33. svc.QualificationSelectBase(c)
  34. }
  35. // QualificationEnterpriseSave
  36. // @Summary 企业认证保存
  37. // @Tags 账号中心------嘉俊
  38. // @Description 资质认证-企业认证保存
  39. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  40. // @Accept json
  41. // @Produce json
  42. // @Param args body md.MediumList true "请求参数"
  43. // @Success 200 {string} "具体看返回内容"
  44. // @Failure 400 {object} md.Response "具体错误"
  45. // @Router /api/account/qualification/enterprise/save [POST]
  46. func QualificationEnterpriseSave(c *gin.Context) {
  47. var req md.MediumList
  48. err := c.ShouldBindJSON(&req)
  49. if err != nil {
  50. err = validate.HandleValidateErr(err)
  51. err1 := err.(e.E)
  52. e.OutErr(c, err1.Code, err1.Error())
  53. return
  54. }
  55. err = svc.QualificationEnterpriseSave(c, req)
  56. if err != nil {
  57. e.OutErr(c, 400, err)
  58. return
  59. }
  60. e.OutSuc(c, "success", nil)
  61. return
  62. }
  63. // QualificationBankSave
  64. // @Summary 银行资质保存
  65. // @Tags 账号中心------嘉俊
  66. // @Description 资质认证-银行资质保存
  67. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  68. // @Accept json
  69. // @Produce json
  70. // @Param args body md.MediumBankInfo true "请求参数"
  71. // @Success 200 {string} "具体看返回内容"
  72. // @Failure 400 {object} md.Response "具体错误"
  73. // @Router /api/account/qualification/bank/save [POST]
  74. func QualificationBankSave(c *gin.Context) {
  75. var req md.MediumBankInfo
  76. err := c.ShouldBindJSON(&req)
  77. if err != nil {
  78. err = validate.HandleValidateErr(err)
  79. err1 := err.(e.E)
  80. e.OutErr(c, err1.Code, err1.Error())
  81. return
  82. }
  83. err = svc.QualificationBankSave(c, req)
  84. if err != nil {
  85. e.OutErr(c, 400, err)
  86. return
  87. }
  88. e.OutSuc(c, "success", nil)
  89. return
  90. }
  91. // QualificationContactSave
  92. // @Summary 联系方式保存
  93. // @Tags 账号中心------嘉俊
  94. // @Description 资质认证-联系方式保存
  95. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  96. // @Accept json
  97. // @Produce json
  98. // @Param args body md.MediumContactInfo true "请求参数"
  99. // @Success 200 {string} "具体看返回内容"
  100. // @Failure 400 {object} md.Response "具体错误"
  101. // @Router /api/account/qualification/contact/save [POST]
  102. func QualificationContactSave(c *gin.Context) {
  103. var req md.MediumContactInfo
  104. err := c.ShouldBindJSON(&req)
  105. if err != nil {
  106. err = validate.HandleValidateErr(err)
  107. err1 := err.(e.E)
  108. e.OutErr(c, err1.Code, err1.Error())
  109. return
  110. }
  111. err = svc.QualificationContactSave(c, req)
  112. if err != nil {
  113. e.OutErr(c, 400, err)
  114. return
  115. }
  116. e.OutSuc(c, "success", nil)
  117. return
  118. }