Administrator
2 days ago 0e1302646a350fdc7cd31e7034f097792f337c36
src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
@@ -9,6 +9,7 @@
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;
@@ -19,6 +20,7 @@
 **/
@Slf4j
@Component
@ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true")
public class AgentConsumer {
    @Autowired
@@ -138,4 +140,24 @@
            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);
        }
    }
}