Commit c50d5a1c by 吕明尚

修改支付回调

parent ad54ecdb
...@@ -151,7 +151,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -151,7 +151,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMembershipLevel, 1L) .eq(MemberConfig::getMembershipLevel, 1L)
.eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())); .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()));
one.setExpirationDate(DateUtils.addDays(new Date(), memberConfig.getValidityPeriod().intValue())); one.setExpirationDate(DateUtils.addYears(new Date(), memberConfig.getValidityPeriod().intValue()));
consumerMemberService.updateConsumerMember(one); consumerMemberService.updateConsumerMember(one);
BigDecimal balance = consumerWallet.getBalance().add(recharge.getRechargeAmount()).add(rechargeConf.getGiveAmount()); BigDecimal balance = consumerWallet.getBalance().add(recharge.getRechargeAmount()).add(rechargeConf.getGiveAmount());
consumerWallet.setBalance(balance); consumerWallet.setBalance(balance);
......
...@@ -155,7 +155,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -155,7 +155,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
.eq(MemberConfig::getMembershipLevel, equityMembersOrderConfig.getDefaultLevel()) .eq(MemberConfig::getMembershipLevel, equityMembersOrderConfig.getDefaultLevel())
.eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex())); .eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex()));
newConsumerMember.setMemberConfigId(memberConfig.getId()); newConsumerMember.setMemberConfigId(memberConfig.getId());
newConsumerMember.setExpirationDate(DateUtils.addDays(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), newConsumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())),
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
newConsumerMember.setMembershipProgress(0L); newConsumerMember.setMembershipProgress(0L);
consumerMemberService.save(newConsumerMember); consumerMemberService.save(newConsumerMember);
...@@ -163,22 +163,23 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -163,22 +163,23 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
if (consumerMember.getMemberType().equals(MemberTypeEnum.RECHARGE.getIndex())) { if (consumerMember.getMemberType().equals(MemberTypeEnum.RECHARGE.getIndex())) {
//充值会员修改为权益会员 //充值会员修改为权益会员
consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
consumerMember.setExpirationDate(DateUtils.addDays(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())),
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
} else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) { } else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
//在原来的基础上增加有效期 //在原来的基础上增加有效期
consumerMember.setExpirationDate(DateUtils.addDays(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, consumerMember.getExpirationDate())), consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, consumerMember.getExpirationDate())),
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
} else { } else {
//修改会员类型为权益会员 //修改会员类型为权益会员
consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
consumerMember.setExpirationDate(DateUtils.addDays(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())),
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
} }
} }
equityMembersOrderMapper.updateEquityMembersOrder(equityMembersOrder);
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("consumerId", String.valueOf(consumerMember.getConsumerId())); map.put("consumerId", String.valueOf(consumerMember.getConsumerId()));
//当前时间加15分钟 //当前时间加15分钟
......
...@@ -153,7 +153,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i ...@@ -153,7 +153,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
.eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())); .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()));
consumerMember.setMemberConfigId(memberConfig.getId()); consumerMember.setMemberConfigId(memberConfig.getId());
consumerMember.setMembershipProgress(0L); consumerMember.setMembershipProgress(0L);
consumerMember.setExpirationDate(DateUtils.addDays(new Date(), memberConfig.getValidityPeriod().intValue())); consumerMember.setExpirationDate(DateUtils.addYears(new Date(), memberConfig.getValidityPeriod().intValue()));
consumerMemberService.save(consumerMember); consumerMemberService.save(consumerMember);
extracted(recharge); extracted(recharge);
} else { } else {
......
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