diff --git a/src/Shentun.Peis.Application/CardRegisters/CardRegisterAppService.cs b/src/Shentun.Peis.Application/CardRegisters/CardRegisterAppService.cs index d89f4c5c..94c7a181 100644 --- a/src/Shentun.Peis.Application/CardRegisters/CardRegisterAppService.cs +++ b/src/Shentun.Peis.Application/CardRegisters/CardRegisterAppService.cs @@ -512,6 +512,11 @@ namespace Shentun.Peis.CardRegisters if (input.CardBalance > 0) { + if (string.IsNullOrWhiteSpace(input.PayModeName)) + { + throw new UserFriendlyException("充值支付方式不能为空"); + } + var payModeEntity = await _payModeRepository.FirstOrDefaultAsync(f => f.DisplayName == input.PayModeName.Trim()); if (payModeEntity == null) {