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


import com.ruoyi.common.core.domain.R;
import com.sooka.sponest.monitor.dahua.domain.CenterdataTAttach;
import com.sooka.sponest.monitor.remoteapi.service.center.data.RemoteDataBaseService;
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.PostMapping;

@Component
public class RemoteDataBaseServiceFallbackFactory implements FallbackFactory<RemoteDataBaseService> {

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

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

        return new RemoteDataBaseService() {

            @PostMapping("/attach/insertAttach")
            public void insertAttach(CenterdataTAttach centerdataTAttach){}

        };



    }
}
