Commit 87fb47ca6a4432d6b93b8533084eee7a5223eaf8
Committed by
Gitee
!698 fix: 修复PayWalletRechargeCerate参数校验
Merge pull request !698 from JaysonAlbert/fix/validate-pay-wallet
Showing
2 changed files
with
1 additions
and
5 deletions
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 { |
| 19 | 19 | private Long packageId; |
| 20 | 20 | |
| 21 | 21 | @AssertTrue(message = "充值金额和充钱套餐不能同时为空") |
| 22 | - public boolean validatePayPriceAndPackageId() { | |
| 22 | + public boolean isPayPriceAndPackageIdValid() { | |
| 23 | 23 | return Objects.nonNull(payPrice) || Objects.nonNull(packageId); |
| 24 | 24 | } |
| 25 | 25 | } | ... | ... |
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 { |
| 65 | 65 | public PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp, |
| 66 | 66 | AppPayWalletRechargeCreateReqVO reqVO) { |
| 67 | 67 | |
| 68 | - if (Objects.isNull(reqVO.getPayPrice()) && Objects.isNull(reqVO.getPackageId())) { | |
| 69 | - // TODO @jason @AssertTrue 貌似没有效果。需要查下原因 | |
| 70 | - throw exception(WALLET_RECHARGE_PACKAGE_AND_PRICE_IS_EMPTY); | |
| 71 | - } | |
| 72 | 68 | // 1.1 计算充值金额 |
| 73 | 69 | int payPrice; |
| 74 | 70 | int bonusPrice = 0; | ... | ... |