123456789101112131415161718192021222324252627282930313233343536 |
- package adm
- import (
- "context"
- "gd_vehicle/apis"
- "gd_vehicle/common.in/utils"
- "gd_vehicle/consts"
- "gd_vehicle/errors"
- "strconv"
- dutils "gd_vehicle/utils"
- )
- func IS01(ctx context.Context, vin string, reply map[string]string, lReqs *[]apis.ThirdpartLogWrite, providerMap map[string]apis.MerchantProviderLimitInfo, rangeNo int) error {
- if CheckProviderApiIsAvaliable(dutils.ADMIS01, providerMap, rangeNo) == nil {
- str, err := (&Adm{
- Ctx: ctx,
- Params: map[string]string{
- "vin": vin,
- },
- Code: consts.IS01,
- LReqs: lReqs,
- Provider: providerMap[dutils.ADMIS01+strconv.Itoa(rangeNo)],
- }).Request()
- if err != nil {
- return err
- }
- utils.Convertion(reply, str)
- } else {
- return errors.ProviderUnavailable
- }
- return nil
- }
|