f
This commit is contained in:
@@ -1210,9 +1210,8 @@ type JRZQVZXFReq struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FLXGG0S4Req struct {
|
type FLXGG0S4Req struct {
|
||||||
IDCard string `json:"id_card" validate:"required,validIDCard"`
|
IDCard string `json:"id_card" validate:"required,validIDCard"`
|
||||||
Name string `json:"name" validate:"required,min=1,validName"`
|
Name string `json:"name" validate:"required,min=1,validName"`
|
||||||
MobileNo string `json:"mobile_no" validate:"required,min=11,max=11,validMobileNo"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type JRZQVZTFReq struct {
|
type JRZQVZTFReq struct {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ func ProcessFLXGG0S4Request(ctx context.Context, params []byte, deps *processors
|
|||||||
body := map[string]string{
|
body := map[string]string{
|
||||||
"name": paramsDto.Name,
|
"name": paramsDto.Name,
|
||||||
"idCard": paramsDto.IDCard,
|
"idCard": paramsDto.IDCard,
|
||||||
"mobile": paramsDto.MobileNo,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nuoerDoCheckAPIKey := "personalLawsuit_cv1"
|
nuoerDoCheckAPIKey := "personalLawsuit_cv1"
|
||||||
|
|||||||
@@ -17,6 +17,26 @@ import (
|
|||||||
|
|
||||||
const defaultRequestTimeout = 4 * time.Second
|
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 诺尔智汇通用响应
|
// nuoerResponse 诺尔智汇通用响应
|
||||||
type nuoerResponse struct {
|
type nuoerResponse struct {
|
||||||
Code int `json:"code"`
|
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 != CodeSuccess {
|
||||||
|
if nuoerResp.Code == BusiCodeNotFound && isQueryBillingAPIKey(apiKey) {
|
||||||
|
nuoerResp.Data = map[string]interface{}{}
|
||||||
|
return &nuoerResp, nil
|
||||||
|
}
|
||||||
nuoerErr := NewNuoerError(nuoerResp.Code, nuoerResp.Msg)
|
nuoerErr := NewNuoerError(nuoerResp.Code, nuoerResp.Msg)
|
||||||
err = errors.Join(GetErrByPlatformCode(nuoerResp.Code), nuoerErr)
|
err = errors.Join(GetErrByPlatformCode(nuoerResp.Code), nuoerErr)
|
||||||
if s.logger != nil {
|
if s.logger != nil {
|
||||||
@@ -179,6 +203,10 @@ func (s *NuoerService) CallAPI(ctx context.Context, apiKey, apiPath string, body
|
|||||||
}
|
}
|
||||||
|
|
||||||
if busiCode != BusiCodeSuccess {
|
if busiCode != BusiCodeSuccess {
|
||||||
|
if busiCode == BusiCodeNotFound && isQueryBillingAPIKey(apiKey) {
|
||||||
|
nuoerResp.Data = map[string]interface{}{}
|
||||||
|
return &nuoerResp, nil
|
||||||
|
}
|
||||||
busiErr := NewNuoerBusiError(busiCode, busiMsg)
|
busiErr := NewNuoerBusiError(busiCode, busiMsg)
|
||||||
err = errors.Join(GetErrByBusiCode(busiCode), busiErr)
|
err = errors.Join(GetErrByBusiCode(busiCode), busiErr)
|
||||||
if s.logger != nil {
|
if s.logger != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user