fux comb298y

This commit is contained in:
2025-06-14 15:20:36 +08:00
parent c8da895533
commit 6bb7f33864
2 changed files with 35 additions and 12 deletions

View File

@@ -121,7 +121,7 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
// {SourceId: "G09XM02", ServiceId: "IVYZ5733", Mapping: westmodel.IVYZ5733FieldMapping, Wrap: "data", Service: "west"},
// {SourceId: "G11BJ06", ServiceId: "IVYZ9A2B", Mapping: westmodel.IVYZ9A2BFieldMapping, Wrap: "data", Service: "west"},
{SourceId: "G05HZ01", ServiceId: "QYGLB4C0", Mapping: westmodel.QYGLB4C0FieldMapping, Wrap: "", Service: "west"},
{SourceId: "RIS031", ServiceId: "FLXG8UI0", Mapping: westmodel.FLXG8UI0FieldMapping, Wrap: "data", Service: "yushan"},
{SourceId: "RIS031", ServiceId: "FLXG8UI0", Mapping: westmodel.FLXG8UI0FieldMapping, Wrap: "", Service: "yushan"},
}
// 为每个请求构建对应的请求参数
@@ -136,7 +136,10 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
logx.Errorf("结构体转map失败%v", err)
return "", errs.ErrSystem
}
logx.Infof("G05HZ01 原始数据: %+v", data)
logx.Infof("G05HZ01 转换后数据: %+v", dataMap)
apiRequests[i].Request = common.MapStructToAPIRequest(dataMap, apiRequests[i].Mapping, apiRequests[i].Wrap)
logx.Infof("G05HZ01 最终请求数据: %+v", apiRequests[i].Request)
} else {
// 其他西部服务需要加密
encryptedRequest, encryptErr := common.EncryptStructFields(data, westConfig.Key)
@@ -150,10 +153,8 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
// 如果是 RIS031添加 type: 3
if apiRequests[i].SourceId == "RIS031" {
apiRequests[i].Request = map[string]interface{}{
"data": map[string]interface{}{
"keyWord": data.IDCard,
"type": 3,
},
"keyWord": data.IDCard,
"type": 3,
}
}
}