diff --git a/internal/domains/api/dto/api_request_dto.go b/internal/domains/api/dto/api_request_dto.go index d0e9eb9..245eced 100644 --- a/internal/domains/api/dto/api_request_dto.go +++ b/internal/domains/api/dto/api_request_dto.go @@ -1210,9 +1210,8 @@ type JRZQVZXFReq struct { } type FLXGG0S4Req struct { - IDCard string `json:"id_card" validate:"required,validIDCard"` - Name string `json:"name" validate:"required,min=1,validName"` - MobileNo string `json:"mobile_no" validate:"required,min=11,max=11,validMobileNo"` + IDCard string `json:"id_card" validate:"required,validIDCard"` + Name string `json:"name" validate:"required,min=1,validName"` } type JRZQVZTFReq struct { diff --git a/internal/domains/api/services/processors/flxg/flxgg0s4_processor.go b/internal/domains/api/services/processors/flxg/flxgg0s4_processor.go index 4ca54fe..8bba84a 100644 --- a/internal/domains/api/services/processors/flxg/flxgg0s4_processor.go +++ b/internal/domains/api/services/processors/flxg/flxgg0s4_processor.go @@ -24,7 +24,6 @@ func ProcessFLXGG0S4Request(ctx context.Context, params []byte, deps *processors body := map[string]string{ "name": paramsDto.Name, "idCard": paramsDto.IDCard, - "mobile": paramsDto.MobileNo, } nuoerDoCheckAPIKey := "personalLawsuit_cv1" diff --git a/internal/infrastructure/external/nuoer/nuoer_service.go b/internal/infrastructure/external/nuoer/nuoer_service.go index a85a24f..348e8ea 100644 --- a/internal/infrastructure/external/nuoer/nuoer_service.go +++ b/internal/infrastructure/external/nuoer/nuoer_service.go @@ -17,6 +17,26 @@ import ( const defaultRequestTimeout = 4 * time.Second +// queryBillingAPIKeys 查询计费接口:数据未查得(busiCode=1000)仍按成功计费,返回空数据 +var queryBillingAPIKeys = map[string]struct{}{ + "idRiskTagV106": {}, // 身份风险V106 + "personalLawsuit_cv2": {}, // 企业诉讼定制版 + "personalLawsuit_cv1": {}, // 个人诉讼定制版 + "loanRiskTagV11": {}, // 借贷意向查询 + "loanRiskTagV5": {}, // 风险变量V5 + "loanRiskTagV12": {}, // 特殊名单 + "blackListV121_3_1": {}, // 债务逾期黑名单V3_1 + "blackListV110": {}, // 特殊名单V110 + "zhiTongModelG": {}, // 智瞳-通用版 + "zhitong_ultra_v4_score": {}, // 智瞳分尊享版 + "zhixiangScore": {}, // 智享分 +} + +func isQueryBillingAPIKey(apiKey string) bool { + _, ok := queryBillingAPIKeys[apiKey] + return ok +} + // nuoerResponse 诺尔智汇通用响应 type nuoerResponse struct { Code int `json:"code"` @@ -153,6 +173,10 @@ func (s *NuoerService) CallAPI(ctx context.Context, apiKey, apiPath string, body } if nuoerResp.Code != CodeSuccess { + if nuoerResp.Code == BusiCodeNotFound && isQueryBillingAPIKey(apiKey) { + nuoerResp.Data = map[string]interface{}{} + return &nuoerResp, nil + } nuoerErr := NewNuoerError(nuoerResp.Code, nuoerResp.Msg) err = errors.Join(GetErrByPlatformCode(nuoerResp.Code), nuoerErr) if s.logger != nil { @@ -179,6 +203,10 @@ func (s *NuoerService) CallAPI(ctx context.Context, apiKey, apiPath string, body } if busiCode != BusiCodeSuccess { + if busiCode == BusiCodeNotFound && isQueryBillingAPIKey(apiKey) { + nuoerResp.Data = map[string]interface{}{} + return &nuoerResp, nil + } busiErr := NewNuoerBusiError(busiCode, busiMsg) err = errors.Join(GetErrByBusiCode(busiCode), busiErr) if s.logger != nil {