修改API响应
This commit is contained in:
@@ -3,7 +3,6 @@ package FLXG
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"tianyuan-api/apps/api/internal/common"
|
||||
"tianyuan-api/apps/api/internal/validator"
|
||||
"tianyuan-api/apps/api/internal/westmodel"
|
||||
@@ -99,19 +98,18 @@ func (l *FLXG3D56Logic) FLXG3D56(req *types.Request) (resp string, err *errs.App
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
var respData westmodel.G26BJ05Response
|
||||
unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
if unmarshalErr != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
if respData.Data.Code != "00" && respData.Data.Code != "100002" {
|
||||
return "", errs.ErrDataSource
|
||||
}
|
||||
//var respData westmodel.G26BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code != "00" && respData.Data.Code != "100002" {
|
||||
// return "", errs.ErrDataSource
|
||||
//}
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user