Commit 5e897beb by 吕明尚

修改充值回调

parent 2d24210f
......@@ -192,11 +192,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
one.setExpirationDate(DateUtils.addYears(new Date(), memberConfig.getValidityPeriod().intValue()));
}
logger.debug("修改会员用户");
BigDecimal balance = consumerWallet.getBalance().add(recharge.getRechargeAmount());
consumerWallet.setBalance(balance);
consumerWallet.setBalance(consumerWallet.getBalance().add(recharge.getRechargeAmount()));
if (rechargeConf.getGiveType().contains(GiveTypeEnum.AMOUNT.getIndex())) {
balance = balance.add(rechargeConf.getGiveAmount());
consumerWallet.setBalance(balance);
consumerWallet.setBalance(consumerWallet.getBalance().add(recharge.getGiveAmount()));
}
if (rechargeConf.getGiveType().contains(GiveTypeEnum.DURATION.getIndex())) {
BigDecimal duration = consumerWallet.getRemainingDuration().add(rechargeConf.getGiveDuration());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment