KKSU
2025-01-14 e6be1946f0a669385d5c27743c3d96113af6bf5a
src/main/java/cc/mrbird/febs/mall/service/impl/RunVipServiceImpl.java
@@ -107,6 +107,9 @@
            reduceAmount = runVipGrow.getAmountNow();
        }
        presentAmount = presentAmount.subtract(reduceAmount);
        if(BigDecimal.ZERO.compareTo(presentAmount) >= 0){
            throw new FebsException("支付异常,请刷新页面重试");
        }
        Long addressId = apiGoChargeDto.getAddressId();
        MallMemberPayment mallMemberPayment = mallMemberPaymentMapper.selectById(addressId);
@@ -200,10 +203,12 @@
                        .orderByDesc(RunVipGrow::getId)
        ).stream().findFirst().orElse(null);
        if(runVipGrow != null){
            BigDecimal amountNow = runVipGrow.getAmountNow();
            reduceAmount = reduceAmount.add(amountNow);
            reduceAmount = runVipGrow.getAmountNow();
        }
        presentAmount = presentAmount.subtract(reduceAmount);
        if(BigDecimal.ZERO.compareTo(presentAmount) >= 0){
            throw new FebsException("支付异常,请刷新页面重试");
        }
        MallMemberWallet mallMemberWallet = mallMemberWalletMapper.selectWalletByMemberId(memberId);
        if(mallMemberWallet.getCommission().compareTo(BigDecimal.ZERO) <= 0){
@@ -544,7 +549,7 @@
            BigDecimal presentPriceNext = runVipNext.getPresentPrice();
            if(presentPriceNext.compareTo(add) <= 0){
                mallCharge.setVipCode(runVipGrow.getLevelNext());
                mallCharge.setVipCode(runVipNext.getVipCode());
            }
        }
        mallChargeMapper.insert(mallCharge);