fix enterprise validate
This commit is contained in:
@@ -96,15 +96,8 @@ func (s *EnterpriseInfoSubmitRecordService) ValidateWithWestdex(ctx context.Cont
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
resultCode := gjson.GetBytes(resp, "code")
|
s.logger.Info("验证企业四要素响应", zap.Any("response", resp))
|
||||||
if !resultCode.Exists() {
|
resultState := gjson.GetBytes(resp, "result.state")
|
||||||
return fmt.Errorf("校验企业信息错误")
|
|
||||||
}
|
|
||||||
if resultCode.String() != "00000" {
|
|
||||||
return fmt.Errorf("校验企业信息错误")
|
|
||||||
}
|
|
||||||
|
|
||||||
resultState := gjson.GetBytes(resp, "data.result.state")
|
|
||||||
if !resultState.Exists() {
|
if !resultState.Exists() {
|
||||||
return fmt.Errorf("校验企业信息错误")
|
return fmt.Errorf("校验企业信息错误")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user