This commit is contained in:
2026-07-22 17:40:57 +08:00
parent 39a97f106c
commit 14d96fabbe
7 changed files with 67 additions and 0 deletions

View File

@@ -240,6 +240,13 @@ type JRZQW3L8Req struct {
MobileNo string `json:"mobile_no" validate:"required,min=11,max=11,validMobileNo"`
}
// JRZQP8D2Req 全景雷达BH
type JRZQP8D2Req struct {
Name string `json:"name" validate:"required,min=1,validName"`
IDCard string `json:"id_card" validate:"required,validIDCard"`
MobileNo string `json:"mobile_no" validate:"required,min=11,max=11,validMobileNo"`
}
type QCXG76VAReq struct {
PlateNo string `json:"plate_no" validate:"required"`
}

View File

@@ -207,6 +207,7 @@ func registerAllProcessors(combService *comb.CombService) {
"JRZQR4N7": jrzq.ProcessJRZQR4N7Request, //借贷意向验证3.0
"JRZQH6M3": jrzq.ProcessJRZQH6M3Request, //无间司南-纯黑A版
"JRZQW3L8": jrzq.ProcessJRZQW3L8Request, //信用司南
"JRZQP8D2": jrzq.ProcessJRZQP8D2Request, //全景雷达BH
"JRZQ0OO1": jrzq.ProcessJRZQ0OO1Request, //戎行贷后信息
// QYGL系列处理器

View File

@@ -316,6 +316,7 @@ func (s *FormConfigServiceImpl) getDTOStruct(ctx context.Context, apiCode string
"JRZQR4N7": &dto.JRZQR4N7Req{}, //借贷意向验证3.0
"JRZQH6M3": &dto.JRZQH6M3Req{}, //无间司南-纯黑A版
"JRZQW3L8": &dto.JRZQW3L8Req{}, //信用司南
"JRZQP8D2": &dto.JRZQP8D2Req{}, //全景雷达BH
"IVYZX7J9": &dto.IVYZX7J9Req{}, //学籍核验
"QCXG6U5G": &dto.QCXG6U5GReq{}, //车辆核验
"JRZQ0OO1": &dto.JRZQ0OO1Req{}, //戎行贷后信息 Info360

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"
)
// ProcessJRZQP8D2Request 全景雷达BH上游 jy000003查空不计费三要素 MD5 入参)
func ProcessJRZQP8D2Request(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
var paramsDto dto.JRZQP8D2Req
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": jiyi.MD5Encrypt(paramsDto.Name),
"idCard": jiyi.MD5Encrypt(paramsDto.IDCard),
"mobile": jiyi.MD5Encrypt(paramsDto.MobileNo),
}
apiKey := "jy000003"
apiPath := "/api/v1/panorama/encrypt"
resp, err := deps.JiyiService.CallAPI(ctx, apiKey, apiPath, body, jiyi.DefaultCallOptions())
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
}