package com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.mqtt.handler;

import com.cico.nest.lcdp.framework.mq.mqtt.core.annoations.MqttTopic;
import com.cico.nest.lcdp.framework.mq.mqtt.core.handler.MqttMessageHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 发送-全息隧道新事件上报隧道管控系统
 *topic = event/设备编码/videoEvent
 * @author rfx
 * @date 2024/11/17
 */

@Slf4j
@MqttTopic(topic = "event/qxsd/videoEvent",messageClass = QxsdTrafficEventReportHandler.class)
@Service
public class QxsdTrafficEventReportHandler implements MqttMessageHandler<QxsdTrafficEventReportHandler> {

    @Override
    public void handleText(QxsdTrafficEventReportHandler qxsdTrafficEventReport) {
        //不接收消息
    }

    /**
     * 上报交通事件消息
     * @param payload
     */
    @Override
    public void sendTo(Object payload) {
        log.info("上报隧道管控新事件，发送mqtt消息体，{}",payload);
        MqttMessageHandler.super.sendTo(payload);
    }
}
