123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package adm
- import (
- "gd_service/apis"
- "gd_service/consts"
- "gd_service/errors"
- )
- /*
- 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
- }*/
- func IS01(req *apis.ThirdpartRequest) (reply string, err error) {
- req.LReq.Search = req.Params["vin"]
- req.ProviderInfo.ThirdpartApiRouter = consts.IS01
- 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
- }
|