package com.wzj.soopin.content.event;

import com.wzj.soopin.content.service.IVlogPushService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.mq.domain.VlogPushEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class VlogPushEventListener {
    private final IVlogPushService vlogPushService;
    @EventListener
    public void handleNeedPushVlogEvent(VlogPushEvent event) {
        log.info("收到需要推送的视频事件，用户ID：{}", event.getUserIdStr());
        vlogPushService.pushVlogToMq(100, event.getTag());
    }
}
