| | |
| | | import org.springframework.amqp.core.Message; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true") |
| | | public class AgentConsumer { |
| | | |
| | | @Autowired |
| | |
| | | log.error("核销活动门票异常", e); |
| | | } |
| | | } |
| | | |
| | | @RabbitListener(queues = QueueConstants.CLOTHES_ADD_LIKE) |
| | | public void getAddLike(Long socialId) { |
| | | log.info("点赞:{}", socialId); |
| | | try { |
| | | happyActivityService.getAddLike(socialId); |
| | | } catch (Exception e) { |
| | | log.error("点赞异常", e); |
| | | } |
| | | } |
| | | |
| | | @RabbitListener(queues = QueueConstants.CLOTHES_ADD_COLLECT) |
| | | public void getAddCollect(Long socialId) { |
| | | log.info("收藏:{}", socialId); |
| | | try { |
| | | happyActivityService.getAddCollect(socialId); |
| | | } catch (Exception e) { |
| | | log.error("收藏异常", e); |
| | | } |
| | | } |
| | | } |