修改API响应

This commit is contained in:
2024-10-13 22:47:49 +08:00
parent 641d7f948c
commit e6467b7004
27 changed files with 124 additions and 439 deletions

View File

@@ -95,21 +95,9 @@ func (l *JRZQ0A03Logic) JRZQ0A03(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
}

View File

@@ -95,21 +95,9 @@ func (l *JRZQ4AA8Logic) JRZQ4AA8(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
}

View File

@@ -95,21 +95,9 @@ func (l *JRZQ8203Logic) JRZQ8203(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
}

View File

@@ -95,21 +95,9 @@ func (l *JRZQDCBELogic) JRZQDCBE(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
}