123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package adm
- import (
- "gd_service/apis"
- "gd_service/consts"
- "gd_service/errors"
- )
- /*func A02(ctx context.Context, vin, plateType string, reply map[string]string, lReqs *[]apis.ThirdpartLogWrite, providerMap map[string]apis.MerchantProviderLimitInfo, rangeNo int) error {
- if CheckProviderApiIsAvaliable(dutils.ADMA02, providerMap, rangeNo) == nil {
- str, err := (&Adm{
- Ctx: ctx,
- Params: map[string]string{
- "vin": vin,
- "plate_type": plateType,
- },
- Code: consts.A02,
- LReqs: lReqs,
- Provider: providerMap[dutils.ADMA02+strconv.Itoa(rangeNo)],
- }).Request()
- if err != nil {
- return err
- }
- utils.Convertion(reply, str)
- } else {
- return errors.ProviderUnavailable
- }
- return nil
- }*/
- func A02(req *apis.ThirdpartRequest) (reply string, err error) {
- req.LReq.Search = req.Params["vin"]
- req.ProviderInfo.ThirdpartApiRouter = consts.A02
- str, err := AdmRequest(req)
- if err != nil {
- return "", err
- }
- if str == "" {
- return "", errors.VendorError
- }
- //respData := make(map[string]string)
- //utils.Convertion(respData, str)
- return str, nil
- }
|