mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 09:30:05 +08:00
!698 fix: 修复PayWalletRechargeCerate参数校验
Merge pull request !698 from JaysonAlbert/fix/validate-pay-wallet
This commit is contained in:
commit
87fb47ca6a
@ -19,7 +19,7 @@ public class AppPayWalletRechargeCreateReqVO {
|
|||||||
private Long packageId;
|
private Long packageId;
|
||||||
|
|
||||||
@AssertTrue(message = "充值金额和充钱套餐不能同时为空")
|
@AssertTrue(message = "充值金额和充钱套餐不能同时为空")
|
||||||
public boolean validatePayPriceAndPackageId() {
|
public boolean isPayPriceAndPackageIdValid() {
|
||||||
return Objects.nonNull(payPrice) || Objects.nonNull(packageId);
|
return Objects.nonNull(payPrice) || Objects.nonNull(packageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
|||||||
public PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp,
|
public PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp,
|
||||||
AppPayWalletRechargeCreateReqVO reqVO) {
|
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 计算充值金额
|
// 1.1 计算充值金额
|
||||||
int payPrice;
|
int payPrice;
|
||||||
int bonusPrice = 0;
|
int bonusPrice = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user