v01.go 535 B

1234567891011121314151617181920212223242526
  1. package adm
  2. import (
  3. "gd_service/apis"
  4. "gd_service/consts"
  5. "gd_service/errors"
  6. "github.com/tidwall/gjson"
  7. )
  8. func V01(req *apis.ThirdpartRequest) (reply string, err error) {
  9. req.LReq.Search = req.Params["plate_no"]
  10. req.ProviderInfo.ThirdpartApiRouter = consts.V01
  11. str, err := AdmRequest(req)
  12. if err != nil {
  13. return "", err
  14. }
  15. if str == "" {
  16. return "", errors.VendorError
  17. }
  18. isMatch := gjson.Get(str, "is_match").String()
  19. //respData := make(map[string]string)
  20. //utils.Convertion(respData, str)
  21. return isMatch, nil
  22. }