1234567891011121314151617181920212223242526272829303132333435363738 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package vehicle
- import (
- "context"
- "gd_vehicle/apis"
- "gd_vehicle/consts"
- "gd_vehicle/errors"
- "gd_vehicle/impl/thirdparty_impl/adm"
- "gd_vehicle/utils"
- )
- // 车牌查车辆信息
- func A001(ctx context.Context, req *apis.CommonReq, reply *apis.CommonReply) error {
- rData := req.Data.(map[string]interface{})
- plateNo := rData["plate_no"].(string)
- plateType := rData["plate_type"].(string)
- if plateNo == "" && plateType == "" {
- return errors.ArgsError
- }
- MerchantProviderLimitInfoList, err := utils.GetProviderInfo(req.MerchantApiInfo.MerchantChildApiId, req.BaseApiId)
- if err != nil {
- return errors.ServiceError
- }
- providerMap, _ := utils.GenProviderInfoMapNew(MerchantProviderLimitInfoList)
- respData := make(map[string]string)
- // TODO 定义返回字段
- err = adm.A04(ctx, plateNo, plateType, "", respData, &reply.LReq, providerMap, consts.RANGEONE)
- if err == nil {
- reply.Data = respData
- return nil
- } else {
- return errors.NoRecord
- }
- }
|