From e6467b7004e88fab07412eb918c07300f8c2ded8 Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Sun, 13 Oct 2024 22:47:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9API=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/internal/logic/FLXG/flxg162alogic.go | 11 ---------- apps/api/internal/logic/FLXG/flxg3d56logic.go | 20 ++++++++--------- apps/api/internal/logic/FLXG/flxg54f5logic.go | 11 ---------- apps/api/internal/logic/FLXG/flxg5876logic.go | 22 +++++-------------- apps/api/internal/logic/FLXG/flxg9687logic.go | 22 +++++-------------- apps/api/internal/logic/FLXG/flxg970flogic.go | 22 +++++-------------- apps/api/internal/logic/FLXG/flxgc9d1logic.go | 22 +++++-------------- apps/api/internal/logic/FLXG/flxgca3dlogic.go | 22 +++++-------------- apps/api/internal/logic/FLXG/flxgdec7logic.go | 22 +++++-------------- apps/api/internal/logic/IVYZ/ivyz385elogic.go | 22 +++++-------------- apps/api/internal/logic/IVYZ/ivyz5733logic.go | 15 ------------- apps/api/internal/logic/IVYZ/ivyz9363logic.go | 22 +++++-------------- apps/api/internal/logic/JRZQ/jrzq0a03logic.go | 22 +++++-------------- apps/api/internal/logic/JRZQ/jrzq4aa8logic.go | 22 +++++-------------- apps/api/internal/logic/JRZQ/jrzq8203logic.go | 22 +++++-------------- apps/api/internal/logic/JRZQ/jrzqdcbelogic.go | 22 +++++-------------- apps/api/internal/logic/QYGL/qygl2acdlogic.go | 22 +++++-------------- apps/api/internal/logic/QYGL/qygl45bdlogic.go | 22 +++++-------------- apps/api/internal/logic/QYGL/qygl6f2dlogic.go | 22 +++++-------------- apps/api/internal/logic/QYGL/qygl8261logic.go | 22 +++++-------------- apps/api/internal/logic/QYGL/qyglb4c0logic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysy09cdlogic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysy4b37logic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysy6f2elogic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysybe08logic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysyd50flogic.go | 22 +++++-------------- apps/api/internal/logic/YYSY/yysyf7dblogic.go | 22 +++++-------------- 27 files changed, 124 insertions(+), 439 deletions(-) diff --git a/apps/api/internal/logic/FLXG/flxg162alogic.go b/apps/api/internal/logic/FLXG/flxg162alogic.go index 3a3c46d..6fbff5e 100644 --- a/apps/api/internal/logic/FLXG/flxg162alogic.go +++ b/apps/api/internal/logic/FLXG/flxg162alogic.go @@ -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" @@ -96,16 +95,6 @@ func (l *FLXG162ALogic) FLXG162A(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" { - return "", errs.ErrSystem - } encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key) if aesEncrypt != nil { return "", errs.ErrSystem diff --git a/apps/api/internal/logic/FLXG/flxg3d56logic.go b/apps/api/internal/logic/FLXG/flxg3d56logic.go index bdc3ca1..be899a6 100644 --- a/apps/api/internal/logic/FLXG/flxg3d56logic.go +++ b/apps/api/internal/logic/FLXG/flxg3d56logic.go @@ -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 } diff --git a/apps/api/internal/logic/FLXG/flxg54f5logic.go b/apps/api/internal/logic/FLXG/flxg54f5logic.go index b32f7b5..afb0dfe 100644 --- a/apps/api/internal/logic/FLXG/flxg54f5logic.go +++ b/apps/api/internal/logic/FLXG/flxg54f5logic.go @@ -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" @@ -96,16 +95,6 @@ func (l *FLXG54F5Logic) FLXG54F5(req *types.Request) (resp string, err *errs.App return "", errs.ErrSystem } - // 5、响应解析 - var respData westmodel.G03HZ01Response - unmarshalErr := json.Unmarshal(westResp, &respData) - if unmarshalErr != nil { - return "", errs.ErrSystem - } - - if respData.Code != "0000" { - return "", errs.ErrSystem - } encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key) if aesEncrypt != nil { return "", errs.ErrSystem diff --git a/apps/api/internal/logic/FLXG/flxg5876logic.go b/apps/api/internal/logic/FLXG/flxg5876logic.go index 994905a..0d97ca5 100644 --- a/apps/api/internal/logic/FLXG/flxg5876logic.go +++ b/apps/api/internal/logic/FLXG/flxg5876logic.go @@ -95,21 +95,9 @@ func (l *FLXG5876Logic) FLXG5876(req *types.Request) (resp string, err *errs.App return "", errs.ErrSystem } - // 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" { - // 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 } diff --git a/apps/api/internal/logic/FLXG/flxg9687logic.go b/apps/api/internal/logic/FLXG/flxg9687logic.go index 3672f9a..ccc2c09 100644 --- a/apps/api/internal/logic/FLXG/flxg9687logic.go +++ b/apps/api/internal/logic/FLXG/flxg9687logic.go @@ -95,21 +95,9 @@ func (l *FLXG9687Logic) FLXG9687(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 } diff --git a/apps/api/internal/logic/FLXG/flxg970flogic.go b/apps/api/internal/logic/FLXG/flxg970flogic.go index ba4318a..f462fbb 100644 --- a/apps/api/internal/logic/FLXG/flxg970flogic.go +++ b/apps/api/internal/logic/FLXG/flxg970flogic.go @@ -95,21 +95,9 @@ func (l *FLXG970FLogic) FLXG970F(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 } diff --git a/apps/api/internal/logic/FLXG/flxgc9d1logic.go b/apps/api/internal/logic/FLXG/flxgc9d1logic.go index 3c561b4..3cffb7e 100644 --- a/apps/api/internal/logic/FLXG/flxgc9d1logic.go +++ b/apps/api/internal/logic/FLXG/flxgc9d1logic.go @@ -95,21 +95,9 @@ func (l *FLXGC9D1Logic) FLXGC9D1(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 } diff --git a/apps/api/internal/logic/FLXG/flxgca3dlogic.go b/apps/api/internal/logic/FLXG/flxgca3dlogic.go index 65bce93..03696de 100644 --- a/apps/api/internal/logic/FLXG/flxgca3dlogic.go +++ b/apps/api/internal/logic/FLXG/flxgca3dlogic.go @@ -95,21 +95,9 @@ func (l *FLXGCA3DLogic) FLXGCA3D(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 } diff --git a/apps/api/internal/logic/FLXG/flxgdec7logic.go b/apps/api/internal/logic/FLXG/flxgdec7logic.go index 2009187..572bdea 100644 --- a/apps/api/internal/logic/FLXG/flxgdec7logic.go +++ b/apps/api/internal/logic/FLXG/flxgdec7logic.go @@ -95,21 +95,9 @@ func (l *FLXGDEC7Logic) FLXGDEC7(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 } diff --git a/apps/api/internal/logic/IVYZ/ivyz385elogic.go b/apps/api/internal/logic/IVYZ/ivyz385elogic.go index 8e3b9a7..6cb878f 100644 --- a/apps/api/internal/logic/IVYZ/ivyz385elogic.go +++ b/apps/api/internal/logic/IVYZ/ivyz385elogic.go @@ -95,21 +95,9 @@ func (l *IVYZ385ELogic) IVYZ385E(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 } diff --git a/apps/api/internal/logic/IVYZ/ivyz5733logic.go b/apps/api/internal/logic/IVYZ/ivyz5733logic.go index 9b3a429..4d56313 100644 --- a/apps/api/internal/logic/IVYZ/ivyz5733logic.go +++ b/apps/api/internal/logic/IVYZ/ivyz5733logic.go @@ -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 diff --git a/apps/api/internal/logic/IVYZ/ivyz9363logic.go b/apps/api/internal/logic/IVYZ/ivyz9363logic.go index e0b90e8..9c465e8 100644 --- a/apps/api/internal/logic/IVYZ/ivyz9363logic.go +++ b/apps/api/internal/logic/IVYZ/ivyz9363logic.go @@ -95,21 +95,9 @@ func (l *IVYZ9363Logic) IVYZ9363(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 } diff --git a/apps/api/internal/logic/JRZQ/jrzq0a03logic.go b/apps/api/internal/logic/JRZQ/jrzq0a03logic.go index ae54cea..fa80b7b 100644 --- a/apps/api/internal/logic/JRZQ/jrzq0a03logic.go +++ b/apps/api/internal/logic/JRZQ/jrzq0a03logic.go @@ -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 } diff --git a/apps/api/internal/logic/JRZQ/jrzq4aa8logic.go b/apps/api/internal/logic/JRZQ/jrzq4aa8logic.go index c94f8a3..9add432 100644 --- a/apps/api/internal/logic/JRZQ/jrzq4aa8logic.go +++ b/apps/api/internal/logic/JRZQ/jrzq4aa8logic.go @@ -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 } diff --git a/apps/api/internal/logic/JRZQ/jrzq8203logic.go b/apps/api/internal/logic/JRZQ/jrzq8203logic.go index fd0c762..f0470e3 100644 --- a/apps/api/internal/logic/JRZQ/jrzq8203logic.go +++ b/apps/api/internal/logic/JRZQ/jrzq8203logic.go @@ -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 } diff --git a/apps/api/internal/logic/JRZQ/jrzqdcbelogic.go b/apps/api/internal/logic/JRZQ/jrzqdcbelogic.go index 86a6237..129dbdb 100644 --- a/apps/api/internal/logic/JRZQ/jrzqdcbelogic.go +++ b/apps/api/internal/logic/JRZQ/jrzqdcbelogic.go @@ -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 } diff --git a/apps/api/internal/logic/QYGL/qygl2acdlogic.go b/apps/api/internal/logic/QYGL/qygl2acdlogic.go index d44c6c0..56663b6 100644 --- a/apps/api/internal/logic/QYGL/qygl2acdlogic.go +++ b/apps/api/internal/logic/QYGL/qygl2acdlogic.go @@ -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 } diff --git a/apps/api/internal/logic/QYGL/qygl45bdlogic.go b/apps/api/internal/logic/QYGL/qygl45bdlogic.go index 005feb0..fe7343c 100644 --- a/apps/api/internal/logic/QYGL/qygl45bdlogic.go +++ b/apps/api/internal/logic/QYGL/qygl45bdlogic.go @@ -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 } diff --git a/apps/api/internal/logic/QYGL/qygl6f2dlogic.go b/apps/api/internal/logic/QYGL/qygl6f2dlogic.go index c6581df..e03c868 100644 --- a/apps/api/internal/logic/QYGL/qygl6f2dlogic.go +++ b/apps/api/internal/logic/QYGL/qygl6f2dlogic.go @@ -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 } diff --git a/apps/api/internal/logic/QYGL/qygl8261logic.go b/apps/api/internal/logic/QYGL/qygl8261logic.go index 59d36ef..221c0d4 100644 --- a/apps/api/internal/logic/QYGL/qygl8261logic.go +++ b/apps/api/internal/logic/QYGL/qygl8261logic.go @@ -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 } diff --git a/apps/api/internal/logic/QYGL/qyglb4c0logic.go b/apps/api/internal/logic/QYGL/qyglb4c0logic.go index de8cc8d..bf69ed9 100644 --- a/apps/api/internal/logic/QYGL/qyglb4c0logic.go +++ b/apps/api/internal/logic/QYGL/qyglb4c0logic.go @@ -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 } diff --git a/apps/api/internal/logic/YYSY/yysy09cdlogic.go b/apps/api/internal/logic/YYSY/yysy09cdlogic.go index 5bae376..a68cede 100644 --- a/apps/api/internal/logic/YYSY/yysy09cdlogic.go +++ b/apps/api/internal/logic/YYSY/yysy09cdlogic.go @@ -96,21 +96,9 @@ func (l *YYSY09CDLogic) YYSY09CD(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 } diff --git a/apps/api/internal/logic/YYSY/yysy4b37logic.go b/apps/api/internal/logic/YYSY/yysy4b37logic.go index 482b7ea..54134d8 100644 --- a/apps/api/internal/logic/YYSY/yysy4b37logic.go +++ b/apps/api/internal/logic/YYSY/yysy4b37logic.go @@ -95,21 +95,9 @@ func (l *YYSY4B37Logic) YYSY4B37(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 } diff --git a/apps/api/internal/logic/YYSY/yysy6f2elogic.go b/apps/api/internal/logic/YYSY/yysy6f2elogic.go index c8efd4e..6cd4259 100644 --- a/apps/api/internal/logic/YYSY/yysy6f2elogic.go +++ b/apps/api/internal/logic/YYSY/yysy6f2elogic.go @@ -96,21 +96,9 @@ func (l *YYSY6F2ELogic) YYSY6F2E(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 } diff --git a/apps/api/internal/logic/YYSY/yysybe08logic.go b/apps/api/internal/logic/YYSY/yysybe08logic.go index c9fe1bf..151d2c7 100644 --- a/apps/api/internal/logic/YYSY/yysybe08logic.go +++ b/apps/api/internal/logic/YYSY/yysybe08logic.go @@ -95,21 +95,9 @@ func (l *YYSYBE08Logic) YYSYBE08(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 } diff --git a/apps/api/internal/logic/YYSY/yysyd50flogic.go b/apps/api/internal/logic/YYSY/yysyd50flogic.go index f14b70e..16cb3ff 100644 --- a/apps/api/internal/logic/YYSY/yysyd50flogic.go +++ b/apps/api/internal/logic/YYSY/yysyd50flogic.go @@ -95,21 +95,9 @@ func (l *YYSYD50FLogic) YYSYD50F(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 } diff --git a/apps/api/internal/logic/YYSY/yysyf7dblogic.go b/apps/api/internal/logic/YYSY/yysyf7dblogic.go index 25ec2ab..f866e7c 100644 --- a/apps/api/internal/logic/YYSY/yysyf7dblogic.go +++ b/apps/api/internal/logic/YYSY/yysyf7dblogic.go @@ -93,21 +93,9 @@ func (l *YYSYF7DBLogic) YYSYF7DB(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 }