From f5218fd6d7542bbc7080b25e700f530f299e033e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Sun, 20 Sep 2026 10:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E5=8A=A1=E9=94=81=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Client/RefereeController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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