fix:手动 全量 推送 校验bug

This commit is contained in:
李鹏军 2024-04-09 14:38:26 +08:00
parent d7cfd153b2
commit 9ddba4f561
2 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,10 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
// 推送新增,需要根据上一次的推送 推断 本次推送 是否可行 // 推送新增,需要根据上一次的推送 推断 本次推送 是否可行
config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId, config = await _trackPushCacheService.IsValidPushAsync(order.SubSystemId, order.CustomId,
order.LatestPushTrackCode, @event.TrackCode); order.LatestPushTrackCode, @event.TrackCode);
if (config is not { IsAutoPush: true })
{
config = null;
}
} }
} }
else else

View File

@ -68,7 +68,7 @@ public class TrackPushCacheService : ITrackPushCacheService, ITransientDependenc
// find swap // find swap
cache.FirstOrDefault(x => x.TrackCode == cache[idx + 1].SwapTrackCode); 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<List<TrackPushContentConfigDto>?> DoGetPushContentConfigsAsync(int subSystemId, int customId) private async Task<List<TrackPushContentConfigDto>?> DoGetPushContentConfigsAsync(int subSystemId, int customId)