add 全国企业司法模型服务查询_V1

This commit is contained in:
2026-01-05 14:26:26 +08:00
parent fe44b452e3
commit c262894372
10 changed files with 70 additions and 9 deletions

View File

@@ -39,11 +39,11 @@ import (
infra_events "tyapi-server/internal/infrastructure/events" infra_events "tyapi-server/internal/infrastructure/events"
"tyapi-server/internal/infrastructure/external/alicloud" "tyapi-server/internal/infrastructure/external/alicloud"
"tyapi-server/internal/infrastructure/external/email" "tyapi-server/internal/infrastructure/external/email"
"tyapi-server/internal/infrastructure/external/jiguang"
"tyapi-server/internal/infrastructure/external/muzi" "tyapi-server/internal/infrastructure/external/muzi"
"tyapi-server/internal/infrastructure/external/ocr" "tyapi-server/internal/infrastructure/external/ocr"
"tyapi-server/internal/infrastructure/external/sms" "tyapi-server/internal/infrastructure/external/sms"
"tyapi-server/internal/infrastructure/external/storage" "tyapi-server/internal/infrastructure/external/storage"
"tyapi-server/internal/infrastructure/external/jiguang"
"tyapi-server/internal/infrastructure/external/tianyancha" "tyapi-server/internal/infrastructure/external/tianyancha"
"tyapi-server/internal/infrastructure/external/westdex" "tyapi-server/internal/infrastructure/external/westdex"
"tyapi-server/internal/infrastructure/external/xingwei" "tyapi-server/internal/infrastructure/external/xingwei"

View File

@@ -636,6 +636,13 @@ type QYGL2S0WReq struct {
EntCode string `json:"ent_code" validate:"omitempty,validUSCI"` EntCode string `json:"ent_code" validate:"omitempty,validUSCI"`
} }
// 全国企业司法模型服务查询_V1
type QYGL66SLReq struct {
EntCode string `json:"ent_code" validate:"omitempty,validUSCI"`
AuthDate string `json:"auth_date" validate:"required,validAuthDate"`
EntName string `json:"ent_name" validate:"omitempty,min=1,validEnterpriseName"`
AuthAuthorizeFileCode string `json:"auth_authorize_file_code" validate:"required"`
}
type JRZQ2F8AReq struct { type JRZQ2F8AReq struct {
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"` MobileNo string `json:"mobile_no" validate:"required,min=11,max=11,validMobileNo"`
@@ -724,8 +731,8 @@ type IVYZ6M8PReq struct {
} }
type IVYZ9H2MReq struct { type IVYZ9H2MReq struct {
IDNo string `json:"id_no" validate:"required,validIDCard"` IDCard string `json:"id_no" validate:"required,validIDCard"`
Name string `json:"name" validate:"required,min=1,validName"` Name string `json:"name" validate:"required,min=1,validName"`
} }
type YYSY9E4AReq struct { type YYSY9E4AReq struct {

View File

@@ -159,6 +159,7 @@ func registerAllProcessors(combService *comb.CombService) {
"QYGL5A9T": qygl.ProcessQYGL5A9TRequest, //全国企业各类工商风险统计数量查询 "QYGL5A9T": qygl.ProcessQYGL5A9TRequest, //全国企业各类工商风险统计数量查询
"QYGL2S0W": qygl.ProcessQYGL2S0WRequest, //失信被执行企业个人查询 "QYGL2S0W": qygl.ProcessQYGL2S0WRequest, //失信被执行企业个人查询
"QYGL5CMP": qygl.ProcessQYGL5CMPRequest, //企业五要素验证 "QYGL5CMP": qygl.ProcessQYGL5CMPRequest, //企业五要素验证
"QYGL66SL": qygl.ProcessQYGL66SLRequest, //全国企业司法模型服务查询_V1
// YYSY系列处理器 // YYSY系列处理器
"YYSYD50F": yysy.ProcessYYSYD50FRequest, "YYSYD50F": yysy.ProcessYYSYD50FRequest,

View File

@@ -204,6 +204,7 @@ func (s *FormConfigServiceImpl) getDTOStruct(ctx context.Context, apiCode string
"IVYZZQT3": &dto.IVYZZQT3Req{}, //人脸比对V3 "IVYZZQT3": &dto.IVYZZQT3Req{}, //人脸比对V3
"IVYZBPQ2": &dto.IVYZBPQ2Req{}, //人脸比对V2 "IVYZBPQ2": &dto.IVYZBPQ2Req{}, //人脸比对V2
"IVYZSFEL": &dto.IVYZSFELReq{}, //全国自然人人像三要素核验_V1 "IVYZSFEL": &dto.IVYZSFELReq{}, //全国自然人人像三要素核验_V1
"QYGL66SL": &dto.QYGL66SLReq{}, //全国企业司法模型服务查询_V1
} }
// 优先返回已配置的DTO // 优先返回已配置的DTO

View File

@@ -24,7 +24,7 @@ func ProcessFLXG0V4BRequest(ctx context.Context, params []byte, deps *processors
if err := deps.Validator.ValidateStruct(paramsDto); err != nil { if err := deps.Validator.ValidateStruct(paramsDto); err != nil {
return nil, errors.Join(processors.ErrInvalidParam, err) return nil, errors.Join(processors.ErrInvalidParam, err)
} }
if paramsDto.IDCard == "350681198611130611" || paramsDto.IDCard == "622301200006250550" { if paramsDto.IDCard == "350681198611130611" || paramsDto.IDCard == "622301200006250550" {
return nil, errors.Join(processors.ErrNotFound, errors.New("查询为空")) return nil, errors.Join(processors.ErrNotFound, errors.New("查询为空"))
} }
encryptedName, err := deps.WestDexService.Encrypt(paramsDto.Name) encryptedName, err := deps.WestDexService.Encrypt(paramsDto.Name)

View File

@@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"tyapi-server/internal/domains/api/dto" "tyapi-server/internal/domains/api/dto"
"tyapi-server/internal/domains/api/services/processors" "tyapi-server/internal/domains/api/services/processors"
"tyapi-server/internal/infrastructure/external/westdex" "tyapi-server/internal/infrastructure/external/westdex"

View File

@@ -23,8 +23,8 @@ func ProcessIVYZ9H2MRequest(ctx context.Context, params []byte, deps *processors
// 构建请求参数 // 构建请求参数
reqData := map[string]interface{}{ reqData := map[string]interface{}{
"idNo": paramsDto.IDNo, "idCard": paramsDto.IDCard,
"name": paramsDto.Name, "name": paramsDto.Name,
} }
// 调用极光APIapiCode为 marriage-single-v2 // 调用极光APIapiCode为 marriage-single-v2

View File

@@ -0,0 +1,53 @@
package qygl
import (
"context"
"encoding/json"
"errors"
"tyapi-server/internal/domains/api/dto"
"tyapi-server/internal/domains/api/services/processors"
"tyapi-server/internal/infrastructure/external/xingwei"
)
// Processqygl66slRequest QYGL66SL API处理方法 - 全国企业司法模型服务查询_V1
func ProcessQYGL66SLRequest(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
var paramsDto dto.QYGL66SLReq
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)
}
// 构建请求数据,
reqData := map[string]interface{}{
"orgName": paramsDto.EntName,
"inquiredAuth": "authed:" + paramsDto.AuthDate,
"uscc": paramsDto.EntCode,
"authAuthorizeFileCode": paramsDto.AuthAuthorizeFileCode,
}
// 调用行为数据API使用指定的project_id
projectID := "CDJ-1068350101956521984"
respBytes, err := deps.XingweiService.CallAPI(ctx, projectID, reqData)
if err != nil {
if errors.Is(err, xingwei.ErrNotFound) {
// 查空情况,返回特定的查空错误
return nil, errors.Join(processors.ErrNotFound, err)
} else if errors.Is(err, xingwei.ErrDatasource) {
// 数据源错误
return nil, errors.Join(processors.ErrDatasource, err)
} else if errors.Is(err, xingwei.ErrSystem) {
// 系统错误
return nil, errors.Join(processors.ErrSystem, err)
} else {
// 其他未知错误
return nil, errors.Join(processors.ErrSystem, err)
}
}
return respBytes, nil
}

View File

@@ -42,4 +42,4 @@ func ProcessYYSY4B21Request(ctx context.Context, params []byte, deps *processors
} }
return respBytes, nil return respBytes, nil
} }

View File

@@ -27,7 +27,7 @@ func ProcessYYSY6D9ARequest(ctx context.Context, params []byte, deps *processors
} }
reqData := map[string]interface{}{ reqData := map[string]interface{}{
"phone": encryptedMobileNo, "phone": encryptedMobileNo,
} }
respData, err := deps.ZhichaService.CallAPI(ctx, "ZCI030", reqData) respData, err := deps.ZhichaService.CallAPI(ctx, "ZCI030", reqData)