| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "app", name = "rabbit-consumer1", havingValue = "true") |
| | | @ConditionalOnProperty(prefix = "app", name = "rabbit-consumer", havingValue = "true") |
| | | public class FollowConsumer { |
| | | |
| | | @Autowired |
| | |
| | | public void addFollowOrder(Message message, Channel channel) { |
| | | String content = new String(message.getBody()); |
| | | log.info("==收到跟单下单消息 : {}", content); |
| | | followOrderOperationService.addFollowerOrder(Long.parseLong(content)); |
| | | synchronized (this) { |
| | | followOrderOperationService.addFollowerOrder(Long.parseLong(content)); |
| | | } |
| | | } |
| | | } |