123456789101112131415161718192021222324252627282930313233343536 |
- // Copyright 2019 gentensh.com. All rights reserved.
- // Use of this source code is governed by gentensh.com.
- package vehicle
- import (
- "context"
- "gd_vehicle/apis"
- "gd_vehicle/consts"
- "gd_vehicle/errors"
- "gd_vehicle/impl/thirdparty_impl/adm"
- "gd_vehicle/utils"
- )
- // 二要素验证
- func V001(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)
- owner := rData["owner"].(string)
- MerchantProviderLimitInfoList, err := utils.GetProviderInfo(req.MerchantApiInfo.MerchantChildApiId, req.BaseApiId)
- if err != nil {
- return errors.ServiceError
- }
- providerMap, _ := utils.GenProviderInfoMapNew(MerchantProviderLimitInfoList)
- respData := make(map[string]string)
- isMatch, err := adm.V01(ctx, plateNo, plateType, owner, &reply.LReq, providerMap, consts.RANGEONE)
- if err == nil {
- respData["is_match"] = isMatch
- reply.Data = respData
- return nil
- } else {
- return errors.NoRecord
- }
- }
|