提交 4b5be35b 作者: 沈振路

挪走消费

上级 baf3233b
...@@ -704,11 +704,7 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -704,11 +704,7 @@ public class CustomerServiceCommonAsyncComponent {
} }
@RabbitListener(queues = RabbitCommonNameConstant.YG_LIMIT_DEATH_QUEUE)
public void listener() {
LOCAL_LOG.info("消费");
redisTemplate.opsForValue().decrement(CustomerCommonConstant.YANG_GUANG_ACCESS_LIMIT_REDIS_KEY);
}
/** /**
* 判断用户是否在关注时间范围内 * 判断用户是否在关注时间范围内
......
package com.yaoyaozw.customer.consumer;
import com.yaoyaozw.customer.constants.CustomerCommonConstant;
import com.yaoyaozw.customer.constants.RabbitCommonNameConstant;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
public class CustomerConsumer {
@Resource
private RedisTemplate<String, Object> redisTemplate;
@RabbitListener(queues = RabbitCommonNameConstant.YG_LIMIT_DEATH_QUEUE)
public void listener() {
redisTemplate.opsForValue().decrement(CustomerCommonConstant.YANG_GUANG_ACCESS_LIMIT_REDIS_KEY);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论