change:推送异常处理逻辑
This commit is contained in:
parent
fefbe18497
commit
4a759333ca
@ -39,9 +39,7 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
|||||||
{
|
{
|
||||||
x.SubSystemId, x.LatestPushTrackCode, x.QuestionType, x.CustomId
|
x.SubSystemId, x.LatestPushTrackCode, x.QuestionType, x.CustomId
|
||||||
});
|
});
|
||||||
if (order == null || order.QuestionType == (int)TrackProblemType.Error) return; // 是否通知?
|
if (order == null) return;
|
||||||
|
|
||||||
TrackPushContentConfigDto? config;
|
|
||||||
|
|
||||||
var log = new TrackPushRecordIndex
|
var log = new TrackPushRecordIndex
|
||||||
{
|
{
|
||||||
@ -58,17 +56,22 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
|||||||
CreateTime = DateTime.Now
|
CreateTime = DateTime.Now
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TrackPushContentConfigDto? config = null;
|
||||||
|
|
||||||
switch (@event.OptionType)
|
switch (@event.OptionType)
|
||||||
{
|
{
|
||||||
case OptionType.无:
|
case OptionType.无:
|
||||||
return;
|
return;
|
||||||
case OptionType.新增:
|
case OptionType.新增:
|
||||||
if (@event.OperationMan == null)
|
if (@event.OperationMan == null)
|
||||||
|
{
|
||||||
|
if (order.QuestionType != (int)TrackProblemType.Error)
|
||||||
{
|
{
|
||||||
// 推送新增,需要根据上一次的推送 推断 本次推送 是否可行
|
// 推送新增,需要根据上一次的推送 推断 本次推送 是否可行
|
||||||
config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId,
|
config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId,
|
||||||
order.LatestPushTrackCode, @event.TrackCode);
|
order.LatestPushTrackCode, @event.TrackCode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 手工推送单条不推断,直接无脑推
|
// 手工推送单条不推断,直接无脑推
|
||||||
@ -132,12 +135,17 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
|||||||
// tips:只有新增会影响推送进度?
|
// tips:只有新增会影响推送进度?
|
||||||
order.LatestPushTrackCode = dto.TrackCode;
|
order.LatestPushTrackCode = dto.TrackCode;
|
||||||
order.LatestPushTime = DateTime.Now;
|
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
|
await _orderRepository.UpdateColumnAsync(order, x => new
|
||||||
{
|
{
|
||||||
x.LatestPushTrackCode, x.QuestionType, x.LatestPushError, x.LatestPushTime
|
x.QuestionType, x.LatestPushError
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user