修改API响应
This commit is contained in:
@@ -95,21 +95,9 @@ func (l *QYGL2ACDLogic) QYGL2ACD(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
//var respData westmodel.G32BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code == "00" || respData.Data.Code == "100002" {
|
||||
// l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
//} else {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
//if aesEncrypt != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
return string(westResp), nil
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
@@ -95,21 +95,9 @@ func (l *QYGL45BDLogic) QYGL45BD(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
//var respData westmodel.G32BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code == "00" || respData.Data.Code == "100002" {
|
||||
// l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
//} else {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
//if aesEncrypt != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
return string(westResp), nil
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
@@ -95,21 +95,9 @@ func (l *QYGL6F2DLogic) QYGL6F2D(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
//var respData westmodel.G32BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code == "00" || respData.Data.Code == "100002" {
|
||||
// l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
//} else {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
//if aesEncrypt != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
return string(westResp), nil
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
@@ -95,21 +95,9 @@ func (l *QYGL8261Logic) QYGL8261(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
//var respData westmodel.G32BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code == "00" || respData.Data.Code == "100002" {
|
||||
// l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
//} else {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
//if aesEncrypt != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
return string(westResp), nil
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
@@ -95,21 +95,9 @@ func (l *QYGLB4C0Logic) QYGLB4C0(req *types.Request) (resp string, err *errs.App
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
|
||||
// 5、响应解析
|
||||
//var respData westmodel.G32BJ05Response
|
||||
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||
//if unmarshalErr != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//
|
||||
//if respData.Data.Code == "00" || respData.Data.Code == "100002" {
|
||||
// l.ctx = context.WithValue(l.ctx, "Charges", true)
|
||||
//} else {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
//encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
//if aesEncrypt != nil {
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
return string(westResp), nil
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
if aesEncrypt != nil {
|
||||
return "", errs.ErrSystem
|
||||
}
|
||||
return encryptData, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user