This commit is contained in:
2026-06-23 11:31:33 +08:00
parent 676198696b
commit e8b9a45763
4 changed files with 54 additions and 0 deletions

View File

@@ -252,6 +252,7 @@ func registerAllProcessors(combService *comb.CombService) {
"QCXGYWSV": qcxg.ProcessQCXGYWSVRequest, //疑似运营车辆查询年度里程10271
"QCXG521L": qcxg.ProcessQCXG521LRequest, // 车辆静态信息查询 10479
"QCXGIJY3": qcxg.ProcessQCXGIJY3Request, // 名下车辆诺尔
"QCXG6U5G": qcxg.ProcessQCXG6U5GRequest, // 车辆核验
// DWBG系列处理器 - 多维报告

View File

@@ -310,6 +310,7 @@ func (s *FormConfigServiceImpl) getDTOStruct(ctx context.Context, apiCode string
"JRZQGJ99": &dto.JRZQGJ99Req{}, //公积金核验
"JRZQFC59": &dto.JRZQFC59Req{}, //房产核验
"IVYZX7J9": &dto.IVYZX7J9Req{}, //学籍核验
"QCXG6U5G": &dto.QCXG6U5GReq{}, //车辆核验
}
// 优先返回已配置的DTO

View File

@@ -0,0 +1,48 @@
package qcxg
import (
"context"
"encoding/json"
"errors"
"hyapi-server/internal/domains/api/dto"
"hyapi-server/internal/domains/api/services/processors"
"hyapi-server/internal/infrastructure/external/nuoer"
)
// ProcessQCXG6U5GRequest QCXG6U5G API处理方法 - 车辆核验
func ProcessQCXG6U5GRequest(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
var paramsDto dto.QCXG6U5GReq
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{
"mobileNo": paramsDto.MobileNo,
}
nuoerDoCheckAPIKey := "idVerify130"
ApiPath := "/v1/doCheck"
resp, err := deps.NuoerService.CallAPI(ctx, nuoerDoCheckAPIKey, ApiPath, body, 2)
if err != nil {
if errors.Is(err, nuoer.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
if errors.Is(err, nuoer.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
}