This commit is contained in:
Mrx
2026-05-29 20:13:12 +08:00
parent 2a174e49e5
commit 4b1176b1e3
17 changed files with 31 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ func ProcessFLXG5A3BRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerPersonalLawsuitToResponse(rawData) result := mapNuoerPersonalLawsuitToResponse(rawData)

View File

@@ -51,7 +51,7 @@ func ProcessFLXG7E8FRequest(ctx context.Context, params []byte, deps *processors
respMap, ok := respData.(map[string]interface{}) respMap, ok := respData.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(respData)
} }
result := map[string]interface{}{ result := map[string]interface{}{

View File

@@ -45,7 +45,7 @@ func ProcessFLXGDEA9Request(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerIdRiskToResponse(rawData) result := mapNuoerIdRiskToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessIVYZRAX2Request(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerKunyuFixToResponse(rawData) result := mapNuoerKunyuFixToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ1D09Request(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskTagV18ToResponse(rawData) result := mapNuoerLoanRiskTagV18ToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ2F8ARequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskTagV9ToResponse(rawData) result := mapNuoerLoanRiskTagV9ToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ3C7BRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerApplyLoanToResponse(rawData) result := mapNuoerApplyLoanToResponse(rawData)

View File

@@ -42,7 +42,7 @@ func ProcessJRZQ4B6CRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskTagV10ToResponse(rawData) result := mapNuoerLoanRiskTagV10ToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ5E9FRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskToResponse(rawData) result := mapNuoerLoanRiskToResponse(rawData)

View File

@@ -55,7 +55,7 @@ func ProcessJRZQ6F2ARequest(ctx context.Context, params []byte, deps *processors
respMap, ok := respData.(map[string]interface{}) respMap, ok := respData.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(respData)
} }
result := mapJRZQ3C7BToJRZQ6F2A(respMap) result := mapJRZQ3C7BToJRZQ6F2A(respMap)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ7F1ARequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskTagV8ToResponse(rawData) result := mapNuoerLoanRiskTagV8ToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ8A2DRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerSpecialListToResponse(rawData) result := mapNuoerSpecialListToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ8B3CRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerConsumerTagToResponse(rawData) result := mapNuoerConsumerTagToResponse(rawData)

View File

@@ -43,7 +43,7 @@ func ProcessJRZQ9D4ERequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerLoanRiskTagV23ToResponse(rawData) result := mapNuoerLoanRiskTagV23ToResponse(rawData)

View File

@@ -40,7 +40,7 @@ func ProcessQYGL5F6ARequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerIdRelationToEntReportResponse(rawData) result := mapNuoerIdRelationToEntReportResponse(rawData)

View File

@@ -40,7 +40,7 @@ func ProcessQYGL6F2DRequest(ctx context.Context, params []byte, deps *processors
rawData, ok := resp.Data.(map[string]interface{}) rawData, ok := resp.Data.(map[string]interface{})
if !ok { if !ok {
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误")) return processors.MarshalRawResponse(resp.Data)
} }
result := mapNuoerIdRelationToResponse(rawData) result := mapNuoerIdRelationToResponse(rawData)

View File

@@ -0,0 +1,15 @@
package processors
import (
"encoding/json"
"errors"
)
// MarshalRawResponse 将上游原始响应数据序列化后返回(格式不符合预期时使用)。
func MarshalRawResponse(data interface{}) ([]byte, error) {
respBytes, err := json.Marshal(data)
if err != nil {
return nil, errors.Join(ErrSystem, err)
}
return respBytes, nil
}