package com.sooka.sponest.monitor.remoteapi.fallback.center.event;


import com.ruoyi.common.core.domain.R;
import com.sooka.sponest.monitor.camera.domain.VisuForestCloudMapVO;
import com.sooka.sponest.monitor.device.domain.SensorEventVo;
import com.sooka.sponest.monitor.remoteapi.service.center.event.RemoteEventBaseService;
import com.sooka.sponest.monitor.remoteapi.service.center.event.domain.CentereventTDownloads;
import com.sooka.sponest.monitor.remoteapi.service.center.event.domain.CentereventTEventtype;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
public class RemoteEventBaseServiceFallbackFactory implements FallbackFactory<RemoteEventBaseService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteEventBaseServiceFallbackFactory.class);

    @Override
    public RemoteEventBaseService create(Throwable cause) {
        log.error("事件中心-服务调用失败:{}", cause.getMessage());

        return new RemoteEventBaseService() {

            //查询事件类型选项
            @Override
            public R<List<CentereventTEventtype>> selectFirstEventType(@RequestParam("parentId") String parentId)
            {
                return null;
            }


            @Override
            public R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVOs) {
                return null;
            }

            @Override
            public R downloads(@RequestBody CentereventTDownloads centereventTDownloads) {
                return null;
            }

        };



    }
}
