diff --git a/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs b/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs index d203f21..4181fd2 100644 --- a/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs +++ b/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs @@ -259,6 +259,26 @@ public class UserEventFeeOutput /// 价格 /// public decimal Price { get; set; } + + /// + /// 收款商户名称 + /// + public string? MerchantName { get; set; } + + /// + /// 统一社会信用代码 + /// + public string? CreditCode { get; set; } + + /// + /// 开户行 + /// + public string? BankName { get; set; } + + /// + /// 银行账号 + /// + public string? AccountNumber { get; set; } } /// diff --git a/YD_Event.Application/Event/UserEventRegistrationService.cs b/YD_Event.Application/Event/UserEventRegistrationService.cs index b7e632b..9340363 100644 --- a/YD_Event.Application/Event/UserEventRegistrationService.cs +++ b/YD_Event.Application/Event/UserEventRegistrationService.cs @@ -234,15 +234,30 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient } var fee = await _feeConfigRepository.GetFirstAsync(x => x.EventId == id); - if (fee != null) + if (fee != null) + { + var feeConfig = new UserEventFeeOutput { - output.FeeConfig = new UserEventFeeOutput + ChargeMode = fee.ChargeMode.ToString(), + Price = fee.Price + }; + + // 如果赛事有关联的商户ID,查询并填充商户信息 + if (eventInfo.MerchantId.HasValue) + { + var merchant = await _merchantRepository.GetByIdAsync(eventInfo.MerchantId.Value); + if (merchant != null && merchant.Status == AvailabilityStatus.Enable) { - ChargeMode = fee.ChargeMode.ToString(), - Price = fee.Price - }; + feeConfig.MerchantName = merchant.MerchantName; + feeConfig.CreditCode = merchant.CreditCode; + feeConfig.BankName = merchant.BankName; + feeConfig.AccountNumber = merchant.AccountNumber; + } } + output.FeeConfig = feeConfig; + } + var eventProjects = await _eventProjectRepository.GetListAsync(x => x.EventId == id); var eventProjectIds = eventProjects.Select(x => x.Id).ToList(); var eventProjectGroups = await _eventProjectGroupRepository.GetListAsync(x => eventProjectIds.Contains(x.EventProjectId)); diff --git a/YD_Event.Application/YD_Event.Application.xml b/YD_Event.Application/YD_Event.Application.xml index fb1580d..412b3c8 100644 --- a/YD_Event.Application/YD_Event.Application.xml +++ b/YD_Event.Application/YD_Event.Application.xml @@ -6636,6 +6636,26 @@ 价格 + + + 收款商户名称 + + + + + 统一社会信用代码 + + + + + 开户行 + + + + + 银行账号 + + 用户端赛事项目组别输出