Commit d091fad4 by wuwenlong

Merge remote-tracking branch 'origin/dev' into dev

parents 49963cde 0af5093a
...@@ -52,6 +52,8 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -52,6 +52,8 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
private MemberConfigService memberConfigService; private MemberConfigService memberConfigService;
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Autowired
private ConsumerWalletService consumerWalletService;
/** /**
* 查询权益会员订单 * 查询权益会员订单
...@@ -160,6 +162,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -160,6 +162,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
@Override @Override
public void paymentSuccessful(EquityMembersOrder equityMembersOrder) { public void paymentSuccessful(EquityMembersOrder equityMembersOrder) {
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, equityMembersOrder.getConsumerId())); ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, equityMembersOrder.getConsumerId()));
ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, equityMembersOrder.getConsumerId()));
EquityMembersOrderConfig equityMembersOrderConfig = equityMembersOrderConfigService.selectEquityMembersOrderConfigById(equityMembersOrder.getEquityMembersConfigId()); EquityMembersOrderConfig equityMembersOrderConfig = equityMembersOrderConfigService.selectEquityMembersOrderConfigById(equityMembersOrder.getEquityMembersConfigId());
if (ObjectUtil.isEmpty(consumerMember)) { if (ObjectUtil.isEmpty(consumerMember)) {
ConsumerMember newConsumerMember = new ConsumerMember(); ConsumerMember newConsumerMember = new ConsumerMember();
...@@ -210,6 +213,15 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -210,6 +213,15 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
JSONObject json = new JSONObject(map); JSONObject json = new JSONObject(map);
redisUtil.set(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + equityMembersOrder.getConsumerId(), json.toString()); redisUtil.set(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + equityMembersOrder.getConsumerId(), json.toString());
} }
if (ObjectUtil.isEmpty(consumerWallet)) {
ConsumerWallet consumerWalletOne = new ConsumerWallet();
consumerWalletOne.setConsumerId(equityMembersOrder.getConsumerId());
consumerWalletOne.setBalance(BigDecimal.ZERO);
consumerWalletOne.setRemainingDuration(BigDecimal.ZERO);
consumerWalletOne.setRemainingIntegral(BigDecimal.ZERO);
consumerWalletOne.setCreateTime(new Date());
consumerWalletService.save(consumerWalletOne);
}
updateEquityMembersOrder(equityMembersOrder); updateEquityMembersOrder(equityMembersOrder);
} }
......
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