add idv044
This commit is contained in:
parent
32fcdd7ad1
commit
b18c3d58ab
@ -1690,7 +1690,7 @@ func (l *QueryServiceLogic) ProcessTocBankCardThreeElementsVerificationLogic(req
|
||||
return &types.QueryServiceResp{Id: cacheNo}, nil
|
||||
}
|
||||
|
||||
// ProcessTocMobileRiskAssessmentLogic 手机号码风险评估
|
||||
// ProcessTocMobileRiskAssessmentLogic 高风险特殊手机号
|
||||
func (l *QueryServiceLogic) ProcessTocMobileRiskAssessmentLogic(req *types.QueryServiceReq) (*types.QueryServiceResp, error) {
|
||||
userID, getUidErr := ctxdata.GetUidFromCtx(l.ctx)
|
||||
if getUidErr != nil {
|
||||
|
@ -235,6 +235,7 @@ var requestProcessors = map[string]func(*ApiRequestService, context.Context, []b
|
||||
"HRD004": (*ApiRequestService).ProcessHRD004Request,
|
||||
"mobilelocal": (*ApiRequestService).ProcessMobilelocalRequest, // 手机归属地
|
||||
"sfz": (*ApiRequestService).ProcessSfzRequest, // 身份证归属地
|
||||
"IDV044": (*ApiRequestService).ProcessIDV044Request,
|
||||
}
|
||||
|
||||
// PreprocessRequestApi 调用指定的请求处理函数
|
||||
@ -900,7 +901,7 @@ func (a *ApiRequestService) ProcessCAR059Request(ctx context.Context, params []b
|
||||
maxRetries, orderID.String())
|
||||
}
|
||||
|
||||
// 固定延迟时间为15秒
|
||||
// 固定延迟时间为30秒
|
||||
fixedDelay := 30 * time.Second
|
||||
|
||||
// 检查ctx是否已经有超时
|
||||
@ -922,7 +923,7 @@ func (a *ApiRequestService) ProcessCAR059Request(ctx context.Context, params []b
|
||||
}
|
||||
|
||||
// 等待固定的延迟时间
|
||||
logx.Infof("安排固定延迟重试,订单号: %s, 延迟: 15秒, 重试次数: %d",
|
||||
logx.Infof("安排固定延迟重试,订单号: %s, 延迟: 30秒, 重试次数: %d",
|
||||
orderID.String(), retryCount+1)
|
||||
|
||||
select {
|
||||
@ -1594,7 +1595,7 @@ func (a *ApiRequestService) ProcessFIN018Request(ctx context.Context, params []b
|
||||
}, nil
|
||||
}
|
||||
|
||||
// 手机号码风险评估
|
||||
// 高风险特殊手机号
|
||||
func (a *ApiRequestService) ProcessMOB032Request(ctx context.Context, params []byte) (*APIInternalResult, error) {
|
||||
mobile := gjson.GetBytes(params, "mobile")
|
||||
if !mobile.Exists() {
|
||||
@ -1606,7 +1607,7 @@ func (a *ApiRequestService) ProcessMOB032Request(ctx context.Context, params []b
|
||||
}
|
||||
resp, err := a.yushanService.request("MOB032", request)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("手机号码风险评估失败: %+v", err)
|
||||
return nil, fmt.Errorf("高风险特殊手机号失败: %+v", err)
|
||||
}
|
||||
return &APIInternalResult{
|
||||
Data: resp,
|
||||
@ -1696,3 +1697,21 @@ func (a *ApiRequestService) ProcessSfzRequest(ctx context.Context, params []byte
|
||||
Data: resp,
|
||||
}, nil
|
||||
}
|
||||
func (a *ApiRequestService) ProcessIDV044Request(ctx context.Context, params []byte) (*APIInternalResult, error) {
|
||||
idCard := gjson.GetBytes(params, "id_card")
|
||||
name := gjson.GetBytes(params, "name")
|
||||
if !idCard.Exists() || !name.Exists() {
|
||||
return nil, errors.New("api请求, IDV044, 获取相关参数失败")
|
||||
}
|
||||
request := map[string]interface{}{
|
||||
"cardNo": idCard.String(),
|
||||
"name": name.String(),
|
||||
}
|
||||
resp, err := a.yushanService.request("IDV044", request)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("婚姻状态查询失败: %v", err)
|
||||
}
|
||||
return &APIInternalResult{
|
||||
Data: resp,
|
||||
}, nil
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ type TocBankCardThreeElementsVerification struct {
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 手机号码风险评估
|
||||
// 高风险特殊手机号
|
||||
type TocMobileRiskAssessment struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user