optimize:优化服务商mq日志
This commit is contained in:
parent
c620256082
commit
f0d96c0cb3
@ -90,6 +90,11 @@ public class BatchForwardEventHandler(
|
|||||||
{
|
{
|
||||||
var data = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(replayEvent);
|
var data = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(replayEvent);
|
||||||
rabbitClient.Publish(GlobalConst.InterfaceRelayExchange, @event.ResSubscribeName, data);
|
rabbitClient.Publish(GlobalConst.InterfaceRelayExchange, @event.ResSubscribeName, data);
|
||||||
|
|
||||||
|
context.ServiceProviderRequestLog.Response2 = replayEvent.ToJson();
|
||||||
|
|
||||||
|
// 写服务商日志
|
||||||
|
await logRepository.AddLogAsync(context.ServiceProviderRequestLog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,10 +362,6 @@ public class InterfaceForwardCommon(
|
|||||||
|
|
||||||
if (isMulti) return response; // 一对多不在这映射
|
if (isMulti) return response; // 一对多不在这映射
|
||||||
var res = await flow.OutParamRestructure(context, response);
|
var res = await flow.OutParamRestructure(context, response);
|
||||||
if (context.Feature.IsWait)
|
|
||||||
{
|
|
||||||
context.ServiceProviderRequestLog.Response2 = res.ToJson();
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -386,8 +382,12 @@ public class InterfaceForwardCommon(
|
|||||||
|
|
||||||
// 关联当前服务商日志
|
// 关联当前服务商日志
|
||||||
logRepository.ServiceProviderRequestLog = context.ServiceProviderRequestLog;
|
logRepository.ServiceProviderRequestLog = context.ServiceProviderRequestLog;
|
||||||
// 写服务商日志
|
|
||||||
await logRepository.AddLogAsync(context.ServiceProviderRequestLog);
|
if (!context.Feature.IsWait) // 批量case服务商日志延迟到 handle中处理
|
||||||
|
{
|
||||||
|
// 写服务商日志
|
||||||
|
await logRepository.AddLogAsync(context.ServiceProviderRequestLog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user