This commit is contained in:
2026-07-24 13:15:02 +08:00
parent e6a91b0b0f
commit 7c4cbd2bee
4 changed files with 59 additions and 0 deletions

View File

@@ -215,6 +215,7 @@ func registerAllProcessors(combService *comb.CombService) {
"JRZQS74D": jrzq.ProcessJRZQS74DRequest, //申请借贷
"JRZQ2F4W": jrzq.ProcessJRZQ2F4WRequest, //支付行为
"JRZQ2PV2": jrzq.ProcessJRZQ2PV2Request, //租赁通用版v2
"JRZQ5J5C": jrzq.ProcessJRZQ5J5CRequest, //无间司南-纯黑版C10 金融黑名单
// QYGL系列处理器
"QYGL7HBN": qygl.ProcessQYGL7HBNRequest, //企业全景报告(聚合 QYGLUY3S/QYGLJ0Q1/QYGL5S1I

View File

@@ -331,6 +331,7 @@ func (s *FormConfigServiceImpl) getDTOStruct(ctx context.Context, apiCode string
"QCXGVJ70": &dto.QCXGVJ70Req{}, //车牌号查vin
"QCXG2Y8X": &dto.QCXG2Y8XReq{}, //商业险有效性
"QCXG74YT": &dto.QCXG74YTReq{}, //交强险有效性
"JRZQ5J5C": &dto.JRZQ5J5CReq{}, //无间司南-纯黑版C10 金融黑名单
}
// 优先返回已配置的DTO

View File

@@ -0,0 +1,50 @@
package jrzq
import (
"context"
"encoding/json"
"errors"
"hyapi-server/internal/domains/api/dto"
"hyapi-server/internal/domains/api/services/processors"
"hyapi-server/internal/infrastructure/external/jiyi"
)
// ProcessJRZQ5J5CRequest 无间司南-纯黑A版上游 jy000052
func ProcessJRZQ5J5CRequest(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
var paramsDto dto.JRZQ5J5CReq
if err := json.Unmarshal(params, &paramsDto); err != nil {
return nil, errors.Join(processors.ErrSystem, err)
}
if err := deps.Validator.ValidateStruct(paramsDto); err != nil {
return nil, errors.Join(processors.ErrInvalidParam, err)
}
body := map[string]string{
"name": paramsDto.Name,
"idNo": paramsDto.IDCard,
"mobile": paramsDto.MobileNo,
}
apiKey := "jy000052"
apiPath := "/api/v1/wujsinan/blacka"
resp, err := deps.JiyiService.CallAPI(ctx, apiKey, apiPath, body, jiyi.TopEncryptionOptions(1))
if err != nil {
if errors.Is(err, jiyi.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
if errors.Is(err, jiyi.ErrNotFound) {
return nil, errors.Join(processors.ErrNotFound, err)
}
return nil, errors.Join(processors.ErrSystem, err)
}
respBytes, err := json.Marshal(resp.Data)
if err != nil {
return nil, errors.Join(processors.ErrSystem, err)
}
return respBytes, nil
}