f
This commit is contained in:
@@ -8,6 +8,9 @@ import (
|
|||||||
"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/shumai"
|
"tyapi-server/internal/infrastructure/external/shumai"
|
||||||
|
"tyapi-server/internal/shared/logger"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProcessIVYZX5Q2Request IVYZX5Q2 活体识别步骤二API处理方法
|
// ProcessIVYZX5Q2Request IVYZX5Q2 活体识别步骤二API处理方法
|
||||||
@@ -45,10 +48,14 @@ func ProcessIVYZX5Q2Request(ctx context.Context, params []byte, deps *processors
|
|||||||
}
|
}
|
||||||
|
|
||||||
// result==2 时手动抛出错误(不通过/无记录,不返回正常响应)
|
// result==2 时手动抛出错误(不通过/无记录,不返回正常响应)
|
||||||
var ProcessIVYZX5Q2Request struct {
|
var body struct {
|
||||||
Result int `json:"result"`
|
Result int `json:"result"`
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(respBytes, &ProcessIVYZX5Q2Request); err == nil && ProcessIVYZX5Q2Request.Result == 2 {
|
if err := json.Unmarshal(respBytes, &body); err == nil && body.Result == 2 {
|
||||||
|
log := logger.GetGlobalLogger()
|
||||||
|
log.Warn("IVYZX5Q2 活体检测 result=2 无记录或不通过,返回错误",
|
||||||
|
zap.Int("result", body.Result),
|
||||||
|
zap.ByteString("response", respBytes))
|
||||||
return nil, errors.Join(processors.ErrNotFound, errors.New("活体检测 result=2 无记录或不通过"))
|
return nil, errors.Join(processors.ErrNotFound, errors.New("活体检测 result=2 无记录或不通过"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user