diff --git a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs index 9ebea1f6..a9a207e9 100644 --- a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs +++ b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs @@ -70,6 +70,10 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe // 推送新增,需要根据上一次的推送 推断 本次推送 是否可行 config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId, order.LatestPushTrackCode, @event.TrackCode); + if (config is not { IsAutoPush: true }) + { + config = null; + } } } else diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs index eb4c2504..e5d413f4 100644 --- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs +++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs @@ -68,7 +68,7 @@ public class TrackPushCacheService : ITrackPushCacheService, ITransientDependenc // find swap cache.FirstOrDefault(x => x.TrackCode == cache[idx + 1].SwapTrackCode); - return matched != null && matched.TrackCode == trackCode && matched.IsAutoPush ? matched : default; + return matched != null && matched.TrackCode == trackCode ? matched : default; } private async Task?> DoGetPushContentConfigsAsync(int subSystemId, int customId)