fix ivyz3p9m

This commit is contained in:
2025-11-19 13:41:41 +08:00
parent 604174cce7
commit 15d0759cfb
7 changed files with 459 additions and 4 deletions

View File

@@ -289,8 +289,9 @@ type IVYZ7F3AReq struct {
}
type IVYZ3P9MReq struct {
IDCard string `json:"id_card" validate:"required,validIDCard"`
Name string `json:"name" validate:"required,min=1,validName"`
IDCard string `json:"id_card" validate:"required,validIDCard"`
Name string `json:"name" validate:"required,min=1,validName"`
ReturnType string `json:"return_type" validate:"omitempty,oneof=1 2"`
}
type IVYZ3A7FReq struct {

View File

@@ -367,6 +367,7 @@ func (s *FormConfigServiceImpl) generateFieldLabel(jsonTag string) string {
"plate_no": "车牌号",
"plate_type": "号牌类型",
"vin_code": "车辆识别代号VIN码",
"return_type": "返回类型",
}
if label, exists := labelMap[jsonTag]; exists {
@@ -407,6 +408,7 @@ func (s *FormConfigServiceImpl) generateExampleValue(fieldType reflect.Type, jso
"plate_no": "京A12345",
"plate_type": "01",
"vin_code": "LSGBF53M8DS123456",
"return_type": "1",
}
if example, exists := exampleMap[jsonTag]; exists {
@@ -456,6 +458,7 @@ func (s *FormConfigServiceImpl) generatePlaceholder(jsonTag string, fieldType st
"plate_no": "请输入车牌号",
"plate_type": "请选择号牌类型01或02",
"vin_code": "请输入17位车辆识别代号VIN码",
"return_type": "请选择返回类型",
}
if placeholder, exists := placeholderMap[jsonTag]; exists {
@@ -507,6 +510,7 @@ func (s *FormConfigServiceImpl) generateDescription(jsonTag string, validation s
"plate_no": "请输入车牌号",
"plate_type": "号牌类型01-小型汽车02-大型汽车(可选)",
"vin_code": "请输入17位车辆识别代号VIN码Vehicle Identification Number",
"return_type": "返回类型1-专业和学校名称数据返回编码形式默认2-专业和学校名称数据返回中文名称",
}
if desc, exists := descMap[jsonTag]; exists {

View File

@@ -31,9 +31,16 @@ func ProcessIVYZ3P9MRequest(ctx context.Context, params []byte, deps *processors
return nil, errors.Join(processors.ErrSystem, err)
}
// 处理 returnType 参数,默认为 "1"
returnType := paramsDto.ReturnType
if returnType == "" {
returnType = "1"
}
reqData := map[string]interface{}{
"realName": encryptedName,
"certCode": encryptedCertCode,
"realName": encryptedName,
"certCode": encryptedCertCode,
"returnType": returnType,
}
respData, err := deps.MuziService.CallAPI(ctx, "PC0041", reqData)