package com.yuchen.saas.park.service.iot.service.impl;

import com.yuchen.saas.park.service.factory.IotDeviceMqttFactory;
import com.yuchen.saas.park.service.iot.service.IotDeviceMqttService;
import com.yuchen.saas.park.service.iot.service.SaasParkDeviceMqttService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author zhouhanwei
 * @create 2024/9/12 19:10
 */
@Service
@Slf4j
public class SaasParkDeviceMqttServiceImpl implements SaasParkDeviceMqttService {

    @Override
    public void receiveIotEvent(String key, String json) {
        IotDeviceMqttService iotDeviceMqttService = IotDeviceMqttFactory.getDeviceMqttService(key);
        iotDeviceMqttService.receiveIotEvent(json);
    }
}
