1234567891011121314151617181920212223242526272829303132333435363738 |
- package adm
- import (
- "context"
- "gd_vehicle/apis"
- "gd_vehicle/common.in/utils"
- "gd_vehicle/consts"
- "gd_vehicle/errors"
- dutils "gd_vehicle/utils"
- "strconv"
- )
- // reply 必须是指针
- func A04(ctx context.Context, plateNo, plateType, vin string, reply map[string]string, lReqs *[]apis.ThirdpartLogWrite, providerMap map[string]apis.MerchantProviderLimitInfo, rangeNo int) error {
- // ADM-A04
- if CheckProviderApiIsAvaliable(dutils.ADMA04, providerMap, rangeNo) == nil {
- str, err := (&Adm{
- Ctx: ctx,
- Params: map[string]string{
- "plate_no": plateNo,
- "plate_type": plateType,
- },
- Code: consts.A04,
- LReqs: lReqs,
- Provider: providerMap[dutils.ADMA04+strconv.Itoa(rangeNo)],
- }).Request()
- if err != nil {
- return err
- }
- utils.Convertion(reply, str)
- } else {
- return errors.ProviderUnavailable
- }
- return nil
- }
|