Commit 0c2521ea by 吕明尚

修改自动任务

parent 57cf320e
......@@ -491,6 +491,7 @@ public class RedisTask {
SConsumer sConsumer = sConsumerService.getById(consumerId);
logger.debug("手机号为:{}的用户年度权益会员将在3天后失效", sConsumer.getPhone());
smsService.sendOneSms(sConsumer.getPhone(), "年度权益会员将在3天后失效,请及时续约保障权益会员的权益");
redisUtil.delete(key);
}
});
}
......@@ -509,12 +510,15 @@ public class RedisTask {
if (expirationTime.getTime() < new Date().getTime()) {
ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, consumerId));
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerId));
if (ObjectUtil.isNotEmpty(consumerWallet)) {
consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
} else {
consumerMember.setMemberType(MemberTypeEnum.NORMAL.getIndex());
if (ObjectUtil.isNotEmpty(consumerMember)) {
if (ObjectUtil.isNotEmpty(consumerWallet)) {
consumerMember.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
} else {
consumerMember.setMemberType(MemberTypeEnum.NORMAL.getIndex());
}
consumerMemberService.updateConsumerMember(consumerMember);
}
consumerMemberService.updateConsumerMember(consumerMember);
redisUtil.delete(key);
}
});
}
......@@ -534,7 +538,7 @@ public class RedisTask {
Map<Long, List<MemberProgressLog>> collect = list.stream().collect(Collectors.groupingBy(MemberProgressLog::getConsumerId));
consumerIds.stream().forEach(item -> {
List<MemberProgressLog> memberProgressLogs = collect.get(item);
if (memberProgressLogs.size() > 1) {
if (memberProgressLogs.size() > 0) {
final BigDecimal[] sum = {BigDecimal.ZERO};
memberProgressLogs.stream().forEach(log -> {
if (log.getOperationType().equals(YesNoEnum.yes.getIndex())) {
......
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