f
This commit is contained in:
@@ -45,7 +45,7 @@ func ProcessFLXG5A3BRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerPersonalLawsuitToResponse(rawData)
|
||||
|
||||
@@ -51,7 +51,7 @@ func ProcessFLXG7E8FRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
respMap, ok := respData.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(respData)
|
||||
}
|
||||
|
||||
result := map[string]interface{}{
|
||||
|
||||
@@ -45,7 +45,7 @@ func ProcessFLXGDEA9Request(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerIdRiskToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessIVYZRAX2Request(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerKunyuFixToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ1D09Request(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskTagV18ToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ2F8ARequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskTagV9ToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ3C7BRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerApplyLoanToResponse(rawData)
|
||||
|
||||
@@ -42,7 +42,7 @@ func ProcessJRZQ4B6CRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskTagV10ToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ5E9FRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskToResponse(rawData)
|
||||
|
||||
@@ -55,7 +55,7 @@ func ProcessJRZQ6F2ARequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
respMap, ok := respData.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(respData)
|
||||
}
|
||||
|
||||
result := mapJRZQ3C7BToJRZQ6F2A(respMap)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ7F1ARequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskTagV8ToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ8A2DRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerSpecialListToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ8B3CRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerConsumerTagToResponse(rawData)
|
||||
|
||||
@@ -43,7 +43,7 @@ func ProcessJRZQ9D4ERequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerLoanRiskTagV23ToResponse(rawData)
|
||||
|
||||
@@ -40,7 +40,7 @@ func ProcessQYGL5F6ARequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerIdRelationToEntReportResponse(rawData)
|
||||
|
||||
@@ -40,7 +40,7 @@ func ProcessQYGL6F2DRequest(ctx context.Context, params []byte, deps *processors
|
||||
|
||||
rawData, ok := resp.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.Join(processors.ErrSystem, errors.New("响应格式错误"))
|
||||
return processors.MarshalRawResponse(resp.Data)
|
||||
}
|
||||
|
||||
result := mapNuoerIdRelationToResponse(rawData)
|
||||
|
||||
15
internal/domains/api/services/processors/response.go
Normal file
15
internal/domains/api/services/processors/response.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user