fix comb298y
This commit is contained in:
parent
937d88c9aa
commit
191f6799a0
@ -129,14 +129,8 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
|
|||||||
if apiRequests[i].Service == "west" {
|
if apiRequests[i].Service == "west" {
|
||||||
// 西部服务:先加密后mapping
|
// 西部服务:先加密后mapping
|
||||||
westConfig := l.svcCtx.Config.WestConfig
|
westConfig := l.svcCtx.Config.WestConfig
|
||||||
// 将结构体转换为map
|
// 直接使用结构体进行加密
|
||||||
dataMap, err := common.StructToMap(data)
|
encryptedRequest, encryptErr := common.EncryptStructFields(data, westConfig.Key)
|
||||||
if err != nil {
|
|
||||||
logx.Errorf("结构体转map失败:%v", err)
|
|
||||||
return "", errs.ErrSystem
|
|
||||||
}
|
|
||||||
// 加密
|
|
||||||
encryptedRequest, encryptErr := common.EncryptStructFields(dataMap, westConfig.Key)
|
|
||||||
if encryptErr != nil {
|
if encryptErr != nil {
|
||||||
logx.Errorf("西部加密错误:%v", encryptErr)
|
logx.Errorf("西部加密错误:%v", encryptErr)
|
||||||
return "", errs.ErrSystem
|
return "", errs.ErrSystem
|
||||||
|
Loading…
Reference in New Issue
Block a user