package controller import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" "youngee_b_api/app/service/review_service" ) type AccountController struct{} type IdentifyParam struct { BusinessLicenseUrl string `json:"business_license_url"` } // 营业执照OCR识别 func (t AccountController) OCRIdentify(c *gin.Context) { param := &IdentifyParam{} err := c.BindJSON(param) if err != nil { logrus.Errorf("Request bind err:%+v\n", err) returnError(c, 40000, "参数错误") return } reviewService := review_service.GetConfig() resultMap, err := reviewService.CheckBusinessLicense(param.BusinessLicenseUrl) if err != nil { logrus.Errorf("[OCRIdentify] call Show err:%+v\n", err) returnError(c, 40000, err.Error()) return } returnSuccess(c, 20000, resultMap) }