From 9d221d53f5855689831751cc59e91716344f9e6c Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Thu, 19 Mar 2026 16:42:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BC=9A=E5=91=98=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CardRegisters/CardRegisterAppService.cs | 5 +++++ 1 file changed, 5 insertions(+) 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) {