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 &&