Commit e39ce733 by 吕明尚

修改支付回调

parent 4c519e34
...@@ -510,7 +510,7 @@ public class RedisTask { ...@@ -510,7 +510,7 @@ public class RedisTask {
Long consumerId = jsonObject.getLong("consumerId"); Long consumerId = jsonObject.getLong("consumerId");
if (expirationTime.getTime() < new Date().getTime()) { if (expirationTime.getTime() < new Date().getTime()) {
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerId)); ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerId));
consumerMember.setIsRight(YesNoEnum.no.getIndex()); consumerMember.setIsRights(YesNoEnum.no.getIndex());
if (ObjectUtil.isNotEmpty(consumerMember)) { if (ObjectUtil.isNotEmpty(consumerMember)) {
if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
......
...@@ -71,7 +71,7 @@ public class ConsumerMember extends BaseEntity { ...@@ -71,7 +71,7 @@ public class ConsumerMember extends BaseEntity {
/** /**
* 是否为权益 * 是否为权益
*/ */
private Integer isRight; private Integer isRights;
/** /**
* 是否删除 * 是否删除
......
...@@ -178,7 +178,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -178,7 +178,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
BigDecimal divide = new BigDecimal(0); BigDecimal divide = new BigDecimal(0);
RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId()); RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId());
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMembershipLevel, 1L) .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel())
.eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())); .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()));
one.setExpirationDate(DateUtils.addYears(new Date(), memberConfig.getValidityPeriod().intValue())); one.setExpirationDate(DateUtils.addYears(new Date(), memberConfig.getValidityPeriod().intValue()));
logger.debug("修改会员用户"); logger.debug("修改会员用户");
......
...@@ -161,7 +161,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -161,7 +161,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
newConsumerMember.setMembershipProgress(BigDecimal.ZERO); newConsumerMember.setMembershipProgress(BigDecimal.ZERO);
newConsumerMember.setCreateTime(new Date()); newConsumerMember.setCreateTime(new Date());
newConsumerMember.setIsRight(YesNoEnum.yes.getIndex()); newConsumerMember.setIsRights(YesNoEnum.yes.getIndex());
consumerMemberService.save(newConsumerMember); consumerMemberService.save(newConsumerMember);
logger.debug("新增权益会员"); logger.debug("新增权益会员");
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
...@@ -179,6 +179,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -179,6 +179,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
logger.debug("权益会员原来的基础上增加有效期"); logger.debug("权益会员原来的基础上增加有效期");
} else { } else {
consumerMember.setIsRights(YesNoEnum.yes.getIndex());
//修改会员类型为权益会员 //修改会员类型为权益会员
consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
consumerMember.setMemberConfigId(memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() consumerMember.setMemberConfigId(memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
......
...@@ -155,10 +155,10 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i ...@@ -155,10 +155,10 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
//新增会员 //新增会员
ConsumerMember consumerMember = new ConsumerMember(); ConsumerMember consumerMember = new ConsumerMember();
consumerMember.setConsumerId(recharge.getConsumerId()); consumerMember.setConsumerId(recharge.getConsumerId());
consumerMember.setMembershipLevel(1L); consumerMember.setMembershipLevel(0L);
consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMembershipLevel, 1L) .eq(MemberConfig::getMembershipLevel, 0L)
.eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())); .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()));
consumerMember.setMemberConfigId(memberConfig.getId()); consumerMember.setMemberConfigId(memberConfig.getId());
consumerMember.setMembershipProgress(BigDecimal.ZERO); consumerMember.setMembershipProgress(BigDecimal.ZERO);
......
...@@ -1146,7 +1146,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1146,7 +1146,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerMember.setMembershipLevel(consumerMember.getMembershipLevel() + 1L); consumerMember.setMembershipLevel(consumerMember.getMembershipLevel() + 1L);
consumerMember.setMemberConfigId(one.getId()); consumerMember.setMemberConfigId(one.getId());
} }
} else if (consumerMember.getIsRight().equals(YesNoEnum.yes.getIndex())) { } else if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
MemberConfig one = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() MemberConfig one = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMemberType, consumerMember.getMemberType()) .eq(MemberConfig::getMemberType, consumerMember.getMemberType())
......
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