修改API响应
This commit is contained in:
@@ -3,7 +3,6 @@ package IVYZ
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"tianyuan-api/apps/api/internal/common"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
@@ -95,20 +94,6 @@ func (l *IVYZ5733Logic) IVYZ5733(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
var respData westmodel.G09GX01Response
|
||||
unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
if unmarshalErr != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
if respData.Code == 400 || respData.Code == 500 || respData.Code == 999 {
|
||||
logx.Errorf("西部响应错误%v", respData)
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
if respData.Code == 201 || respData.Code == 202 || respData.Code == 203 {
|
||||
l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
}
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
|
||||
Reference in New Issue
Block a user