diff --git a/YD_Event.Application/Client/RefereeController.cs b/YD_Event.Application/Client/RefereeController.cs index 1ae4aa6..571edb0 100644 --- a/YD_Event.Application/Client/RefereeController.cs +++ b/YD_Event.Application/Client/RefereeController.cs @@ -239,7 +239,7 @@ public class RefereeController : IDynamicApiController // 同一裁判的报名请求必须串行化,否则并发报名两场重叠赛事时, // 两个事务可能都在对方写入前通过撞期校验。锁顺序固定为:裁判 -> 赛事名额。 var referee = await _refereeRepository.AsQueryable() - .With("UPDLOCK, HOLDLOCK") + .With("WITH(UPDLOCK, HOLDLOCK)") .Where(x => x.AppUserId == userId && !x.DeleteMark) .FirstAsync(); if (referee == null) throw Oops.Bah("裁判档案不存在,请先完善裁判资料"); @@ -299,7 +299,7 @@ public class RefereeController : IDynamicApiController { // Apply 由 UnitOfWork 包裹。更新锁和范围锁会把同一赛事的“统计名额并新增报名”串行化, // 防止最后一个名额被并发请求同时占用。 - applicationsQuery = applicationsQuery.With("UPDLOCK, HOLDLOCK"); + applicationsQuery = applicationsQuery.With("WITH(UPDLOCK, HOLDLOCK)"); } var activeApplications = await applicationsQuery