change:推送异常处理逻辑

This commit is contained in:
李鹏军 2024-04-03 09:13:47 +08:00
parent fefbe18497
commit 4a759333ca

View File

@ -39,9 +39,7 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
{
x.SubSystemId, x.LatestPushTrackCode, x.QuestionType, x.CustomId
});
if (order == null || order.QuestionType == (int)TrackProblemType.Error) return; // 是否通知?
TrackPushContentConfigDto? config;
if (order == null) return;
var log = new TrackPushRecordIndex
{
@ -58,6 +56,8 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
CreateTime = DateTime.Now
};
TrackPushContentConfigDto? config = null;
switch (@event.OptionType)
{
case OptionType.无:
@ -65,9 +65,12 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
case OptionType.新增:
if (@event.OperationMan == null)
{
// 推送新增,需要根据上一次的推送 推断 本次推送 是否可行
config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId,
order.LatestPushTrackCode, @event.TrackCode);
if (order.QuestionType != (int)TrackProblemType.Error)
{
// 推送新增,需要根据上一次的推送 推断 本次推送 是否可行
config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId,
order.LatestPushTrackCode, @event.TrackCode);
}
}
else
{
@ -132,12 +135,17 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
// tips:只有新增会影响推送进度?
order.LatestPushTrackCode = dto.TrackCode;
order.LatestPushTime = DateTime.Now;
await _orderRepository.UpdateColumnAsync(order, x => new
{
x.LatestPushTrackCode, x.LatestPushTime, x.QuestionType, x.LatestPushError
});
return;
}
}
await _orderRepository.UpdateColumnAsync(order, x => new
{
x.LatestPushTrackCode, x.QuestionType, x.LatestPushError, x.LatestPushTime
x.QuestionType, x.LatestPushError
});
}