fix
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,6 +25,7 @@ Thumbs.db
|
||||
# 临时文件
|
||||
tmp/
|
||||
temp/
|
||||
console
|
||||
|
||||
# 依赖目录
|
||||
vendor/
|
||||
|
||||
@@ -82,6 +82,7 @@ func registerAllProcessors(combService *comb.CombService) {
|
||||
"FLXG8A3F": flxg.ProcessFLXG8A3FRequest,
|
||||
"FLXG5B2E": flxg.ProcessFLXG5B2ERequest,
|
||||
"FLXG0687": flxg.ProcessFLXG0687Request,
|
||||
"FLXGBC21": flxg.ProcessFLXGBC21Request,
|
||||
|
||||
// JRZQ系列处理器
|
||||
"JRZQ8203": jrzq.ProcessJRZQ8203Request,
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"tyapi-server/internal/infrastructure/external/westdex"
|
||||
)
|
||||
|
||||
// ProcessFLXGbc21Request FLXGbc21 API处理方法
|
||||
func ProcessFLXGbc21Request(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
|
||||
// ProcessFLXGBC21Request FLXGbc21 API处理方法
|
||||
func ProcessFLXGBC21Request(ctx context.Context, params []byte, deps *processors.ProcessorDependencies) ([]byte, error) {
|
||||
var paramsDto dto.FLXG21Req
|
||||
if err := json.Unmarshal(params, ¶msDto); err != nil {
|
||||
return nil, fmt.Errorf("%s: %w", processors.ErrSystem, err)
|
||||
|
||||
@@ -103,15 +103,11 @@ func (y *YushanService) CallAPI(code string, params map[string]interface{}) (res
|
||||
|
||||
var respData []byte
|
||||
|
||||
if IsJSON(string(body)) {
|
||||
respData = body
|
||||
} else {
|
||||
sDec, err := base64.StdEncoding.DecodeString(string(body))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", ErrSystem, err.Error())
|
||||
}
|
||||
respData = y.AES_CBC_Decrypt(sDec, key)
|
||||
}
|
||||
retCode := gjson.GetBytes(respData, "retcode").String()
|
||||
|
||||
if retCode == "100000" {
|
||||
|
||||
Reference in New Issue
Block a user