Commit 2f073ad4 by 吕明尚

修改支付回调

parent e39ce733
......@@ -197,18 +197,6 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
}
int i = updateConsumerWallet(consumerWallet);
//查询当前会员类型和下一级的会员配置
MemberConfig memberConfigServiceOne = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMemberType, one.getMemberType())
.eq(MemberConfig::getMembershipLevel, one.getMembershipLevel() + 1L));
if (ObjectUtil.isNotEmpty(memberConfigServiceOne)) {
//判断是否升级
if (one.getMembershipProgress().compareTo(BigDecimal.valueOf(memberConfigServiceOne.getLimitRequirements())) >= 0) {
one.setMembershipLevel(one.getMembershipLevel() + 1L);
one.setMemberConfigId(one.getId());
}
}
if (consumerWallet.getBalance().compareTo(new BigDecimal(0)) > 0) {
BalanceLog balanceLog = new BalanceLog();
balanceLog.setConsumerId(consumerWallet.getConsumerId());
......@@ -252,7 +240,18 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLogService.save(memberProgressLog);
one.setMembershipProgress(one.getMembershipProgress().add(divide));
}
//查询当前会员类型和下一级的会员配置
MemberConfig memberConfigServiceOne = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMemberType, one.getMemberType())
.eq(MemberConfig::getMembershipLevel, one.getMembershipLevel() + 1L));
if (ObjectUtil.isNotEmpty(memberConfigServiceOne)) {
//判断是否升级
if (one.getMembershipProgress().compareTo(BigDecimal.valueOf(memberConfigServiceOne.getLimitRequirements())) >= 0) {
one.setMembershipLevel(one.getMembershipLevel() + 1L);
one.setMemberConfigId(one.getId());
}
}
consumerMemberService.updateConsumerMember(one);
return i == 1;
}
......
......@@ -235,6 +235,8 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
}
consumerWallet.setCreateTime(new Date());
logger.debug("新增会员钱包");
one.setIsRecharge(YesNoEnum.yes.getIndex());
consumerMemberService.updateConsumerMember(one);
consumerWalletService.addConsumerWallet(consumerWallet);
}
......
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