From c559033720db6cb4585ce7e4d60baba4c7528687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Tue, 12 May 2026 09:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Client/EventClientController.cs | 4 ++-- YD_Event.Application/Event/EventRegistrationService.cs | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/YD_Event.Application/Client/EventClientController.cs b/YD_Event.Application/Client/EventClientController.cs index 59ec067..ef69f49 100644 --- a/YD_Event.Application/Client/EventClientController.cs +++ b/YD_Event.Application/Client/EventClientController.cs @@ -442,7 +442,7 @@ public class EventClientController : IDynamicApiController feeConfigDto.ProjectPrices = new Dictionary(); foreach (var ep in eventProjects) { - feeConfigDto.ProjectPrices[ep.Id] = ep.Price / 100m; + feeConfigDto.ProjectPrices[ep.Id] = ep.Price; } } } @@ -499,7 +499,7 @@ public class EventClientController : IDynamicApiController Name = bp?.Name ?? "", TypeName = bp?.ProjectType.Description() ?? "", ProjectType = (long)(bp?.ProjectType ?? 0), - Fee = ep.Price / 100m, + Fee = ep.Price, ProjectLimitCount = pl?.LimitCount, Groups = epGroups.Select(eg => { diff --git a/YD_Event.Application/Event/EventRegistrationService.cs b/YD_Event.Application/Event/EventRegistrationService.cs index 47bfa52..94e6873 100644 --- a/YD_Event.Application/Event/EventRegistrationService.cs +++ b/YD_Event.Application/Event/EventRegistrationService.cs @@ -211,6 +211,16 @@ public class EventRegistrationService : BaseService, ITransie { // 获取当前报名的所有人员 var regPersons = persons.Where(p => p.RegistrationId == dto.Id).ToList(); + + // 计算去重后的人数(按UserId去重) + var uniqueUserIds = regPersons + .Where(p => p.PersonType == PersonType.Athlete && p.UserId > 0) + .Select(p => p.UserId) + .Distinct() + .ToList(); + + // 更新TotalPersonCount为去重后的人数 + dto.TotalPersonCount = uniqueUserIds.Count > 0 ? uniqueUserIds.Count : regPersons.Count(p => p.PersonType == PersonType.Athlete); // 根据报名记录的 MerchantCertificationId 获取单位名称 if (dto.MerchantCertificationId.HasValue &&