account_controller.go 730 B

1234567891011121314151617181920212223242526272829
  1. package controller
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "github.com/sirupsen/logrus"
  5. "youngee_b_api/app/service/review_service"
  6. "youngee_b_api/app/vo"
  7. )
  8. type AccountController struct{}
  9. // 营业执照OCR识别
  10. func (t AccountController) OCRIdentify(c *gin.Context) {
  11. param := &vo.IdentifyParam{}
  12. err := c.BindJSON(param)
  13. if err != nil {
  14. logrus.Errorf("Request bind err:%+v\n", err)
  15. returnError(c, 40000, "Parameter Error: "+err.Error())
  16. return
  17. }
  18. reviewService := review_service.GetConfig()
  19. resultMap, err := reviewService.CheckBusinessLicense(param)
  20. if err != nil {
  21. logrus.Errorf("[OCRIdentify] call Show err:%+v\n", err)
  22. returnError(c, 40000, err.Error())
  23. return
  24. }
  25. returnSuccess(c, 20000, resultMap)
  26. }