From f4ea648ac9ad280850be43d1c0575189c3d6a3a2 Mon Sep 17 00:00:00 2001 From: Jayson Albert Date: Sat, 28 Oct 2023 19:45:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DPayWalletRechargeCerat?= =?UTF-8?q?e=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java | 2 +- .../pay/service/wallet/PayWalletRechargeServiceImpl.java | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java index 1421fb0b5..a8c2b7ab9 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java @@ -19,7 +19,7 @@ public class AppPayWalletRechargeCreateReqVO { private Long packageId; @AssertTrue(message = "充值金额和充钱套餐不能同时为空") - public boolean validatePayPriceAndPackageId() { + public boolean isPayPriceAndPackageIdValid() { return Objects.nonNull(payPrice) || Objects.nonNull(packageId); } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java index 5abc185e6..6144ab13d 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java @@ -65,10 +65,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { public PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp, AppPayWalletRechargeCreateReqVO reqVO) { - if (Objects.isNull(reqVO.getPayPrice()) && Objects.isNull(reqVO.getPackageId())) { - // TODO @jason @AssertTrue 貌似没有效果。需要查下原因 - throw exception(WALLET_RECHARGE_PACKAGE_AND_PRICE_IS_EMPTY); - } // 1.1 计算充值金额 int payPrice; int bonusPrice = 0;