add huibo ivyz4y27

This commit is contained in:
2026-04-28 12:25:41 +08:00
parent 4f64c22ebc
commit 3b7bf1052e
12 changed files with 632 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
package ivyz
import (
"context"
"encoding/json"
"errors"
"tyapi-server/internal/domains/api/dto"
"tyapi-server/internal/domains/api/services/processors"
)
// ProcessIVYZ4Y27Request IVYZ4Y27 API处理方法 - 教育背景(详细)查询
func ProcessIVYZ4Y27Request(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
var paramsDto dto.IVYZ4Y27Req
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)
}
if deps.HuiboService == nil {
return nil, errors.Join(processors.ErrSystem, errors.New("汇博服务未初始化"))
}
respBytes, err := deps.HuiboService.CallEducationBackgroundDetailed(ctx, paramsDto.Name, paramsDto.IDCard, paramsDto.AuthAuthorizeFileBase64)
if err != nil {
return nil, errors.Join(processors.ErrDatasource, err)
}
return respBytes, nil
}