This commit is contained in:
Mrx
2026-01-23 17:53:11 +08:00
parent 6104bfb84f
commit b05c459b81
28 changed files with 1416 additions and 59 deletions

View File

@@ -47,17 +47,13 @@ func ProcessJRZQO6L7Request(ctx context.Context, params []byte, deps *processors
}
// 使用 WithSkipCode201Check 不跳过 201 错误检查,当 Code == "201" 时返回错误
ctx = zhicha.WithSkipCode201Check(ctx)
// ctx = zhicha.WithSkipCode201Check(ctx)
respData, err := deps.ZhichaService.CallAPI(ctx, "ZCI081", reqData)
if err != nil {
if errors.Is(err, zhicha.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
if errors.Is(err, zhicha.ErrNotFound) {
return nil, errors.Join(processors.ErrNotFound, err)
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
return nil, errors.Join(processors.ErrSystem, err)
}
// 将响应数据转换为JSON字节

View File

@@ -48,17 +48,13 @@ func ProcessJRZQO7L1Request(ctx context.Context, params []byte, deps *processors
}
// 使用 WithSkipCode201Check 不跳过 201 错误检查,当 Code == "201" 时返回错误
ctx = zhicha.WithSkipCode201Check(ctx)
// ctx = zhicha.WithSkipCode201Check(ctx)
respData, err := deps.ZhichaService.CallAPI(ctx, "ZCI080", reqData)
if err != nil {
if errors.Is(err, zhicha.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
if errors.Is(err, zhicha.ErrNotFound) {
return nil, errors.Join(processors.ErrNotFound, err)
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
return nil, errors.Join(processors.ErrSystem, err)
}
// 将响应数据转换为JSON字节

View File

@@ -43,17 +43,13 @@ func ProcessJRZQS7G0Request(ctx context.Context, params []byte, deps *processors
"authorized": paramsDto.Authorized,
}
// 使用 WithSkipCode201Check 不跳过 201 错误检查,当 Code == "201" 时返回错误
ctx = zhicha.WithSkipCode201Check(ctx)
// ctx = zhicha.WithSkipCode201Check(ctx)
respData, err := deps.ZhichaService.CallAPI(ctx, "ZCI082", reqData)
if err != nil {
if errors.Is(err, zhicha.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
if errors.Is(err, zhicha.ErrNotFound) {
return nil, errors.Join(processors.ErrNotFound, err)
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
return nil, errors.Join(processors.ErrSystem, err)
}
// 将响应数据转换为JSON字节
respBytes, err := json.Marshal(respData)