1、west dex service业务失败响应数据修复
This commit is contained in:
parent
d63d70847b
commit
f3dddf3d79
@ -94,11 +94,6 @@ func (w *WestDexService) CallAPI(code string, reqData map[string]interface{}) (r
|
||||
logx.Infof("西部请求响应%v", westDexResp)
|
||||
|
||||
logx.Infof("西部流水号: %s", westDexResp.ID)
|
||||
// 到这层是西部系统
|
||||
if westDexResp.Code != "00000" {
|
||||
logx.Errorf("【西部数据请求】响应数据业务异常: %s %s", westDexResp.Message, westDexResp.Reason)
|
||||
return []byte(westDexResp.Data), errs.ErrDataSource
|
||||
}
|
||||
|
||||
// 解密响应数据
|
||||
decryptedData, DecryptErr := crypto.WestDexDecrypt(westDexResp.Data, w.config.Key)
|
||||
@ -106,7 +101,10 @@ func (w *WestDexService) CallAPI(code string, reqData map[string]interface{}) (r
|
||||
logx.Errorf("【西部数据请求】响应数据解密错误: %v", DecryptErr)
|
||||
return nil, errs.ErrSystem
|
||||
}
|
||||
|
||||
if westDexResp.Code != "00000" {
|
||||
logx.Errorf("【西部数据请求】响应数据业务异常: %s %s %v", westDexResp.Message, westDexResp.Reason, decryptedData)
|
||||
return decryptedData, errs.ErrDataSource
|
||||
}
|
||||
// 输出解密后的数据
|
||||
return decryptedData, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user