| | |
| | | runVipGrow.setAmount(amount); |
| | | runVipGrowMapper.updateById(runVipGrow); |
| | | }else{ |
| | | |
| | | BigDecimal presentPrice = runVip.getPresentPrice(); |
| | | BigDecimal add = presentPrice.add(amount); |
| | | |
| | | BigDecimal presentPriceNext = runVipNext.getPresentPrice(); |
| | | runVipGrow = new RunVipGrow(); |
| | | runVipGrow.setMemberId(memberId); |
| | | runVipGrow.setLevelNow(memberLevel); |
| | | runVipGrow.setLevelNext(runVipNext.getVipCode()); |
| | | runVipGrow.setAmountAll(runVipNext.getPresentPrice()); |
| | | runVipGrow.setAmount(amount); |
| | | runVipGrow.setAmountNow(amount); |
| | | runVipGrow.setAmountAll(presentPriceNext); |
| | | runVipGrow.setAmount(add); |
| | | runVipGrow.setAmountNow(add); |
| | | runVipGrowMapper.insert(runVipGrow); |
| | | |
| | | if(runVipGrow.getAmountAll().compareTo(amount) <= 0){ |
| | | if(presentPriceNext.compareTo(add) <= 0){ |
| | | mallCharge.setVipCode(runVipGrow.getLevelNext()); |
| | | } |
| | | } |
| | |
| | | mallCharge.setVipCode(runVipGrow.getLevelNext()); |
| | | } |
| | | }else{ |
| | | if(runVipNext.getPresentPrice().compareTo(amount) <= 0){ |
| | | BigDecimal add = runVip.getPresentPrice().add(amount); |
| | | if(runVipNext.getPresentPrice().compareTo(add) <= 0){ |
| | | mallCharge.setVipCode(runVipNext.getVipCode()); |
| | | } |
| | | } |