From bf2f6cfda78a816260fdb479ec0ffa91514dbcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Wed, 9 Sep 2026 15:50:03 +0800 Subject: [PATCH] bug --- .../Workbench/WorkbenchController.cs | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/YD_Event.Application/Workbench/WorkbenchController.cs b/YD_Event.Application/Workbench/WorkbenchController.cs index 47aff7b..7ffb3d3 100644 --- a/YD_Event.Application/Workbench/WorkbenchController.cs +++ b/YD_Event.Application/Workbench/WorkbenchController.cs @@ -615,13 +615,16 @@ public class WorkbenchController : IDynamicApiController }; // 同赛事同场地此前投出中的记录统一置为“已被新投屏替换(20)”,保证大屏只展示最新一条 - await _screenCastRepository.AsUpdateable() + var activeScreenCastUpdate = _screenCastRepository.AsUpdateable() .SetColumns(sc => new EventResultScreenCast { CastStatus = 20 }, appendColumnsByDataFilter: true) - .Where(sc => sc.EventId == input.EventId && - (!input.VenueId.HasValue || sc.VenueId == input.VenueId.Value) && - sc.CastStatus == 0) - .ExecuteCommandAsync(); + .Where(sc => sc.EventId == input.EventId && sc.CastStatus == 0); + if (input.VenueId.HasValue) + { + var venueId = input.VenueId.Value; + activeScreenCastUpdate = activeScreenCastUpdate.Where(sc => sc.VenueId == venueId); + } + await activeScreenCastUpdate.ExecuteCommandAsync(); var screenCast = new EventResultScreenCast { @@ -719,13 +722,16 @@ public class WorkbenchController : IDynamicApiController }).ToList(); // 同赛事同场地此前投出中的记录统一置为“已被新投屏替换(20)”,保证大屏只展示最新一条 - await _screenCastRepository.AsUpdateable() + var activeScreenCastUpdate = _screenCastRepository.AsUpdateable() .SetColumns(sc => new EventResultScreenCast { CastStatus = 20 }, appendColumnsByDataFilter: true) - .Where(sc => sc.EventId == input.EventId && - (!input.VenueId.HasValue || sc.VenueId == input.VenueId.Value) && - sc.CastStatus == 0) - .ExecuteCommandAsync(); + .Where(sc => sc.EventId == input.EventId && sc.CastStatus == 0); + if (input.VenueId.HasValue) + { + var venueId = input.VenueId.Value; + activeScreenCastUpdate = activeScreenCastUpdate.Where(sc => sc.VenueId == venueId); + } + await activeScreenCastUpdate.ExecuteCommandAsync(); var screenCast = new EventResultScreenCast {