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

64 lines
2.0 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. // AgentQualificationEnterprise
  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 {string} "具体看返回内容"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/agentQualification/enterprise [POST]
  20. func AgentQualificationEnterprise(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, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // AgentQualificationEnterpriseAudit
  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.AgentQualificationEnterpriseAuditReq true "请求参数"
  41. // @Success 200 {string} "具体看返回内容"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/agentQualification/enterprise/audit [POST]
  44. func AgentQualificationEnterpriseAudit(c *gin.Context) {
  45. var req md.AgentQualificationEnterpriseAuditReq
  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.AgentQualificationEnterpriseAudit(c, req)
  54. if err != nil {
  55. e.OutErr(c, 400, err)
  56. return
  57. }
  58. e.OutSuc(c, "success", nil)
  59. return
  60. }