package com.yuchen.saas.park.api.feign.repair;

import com.yuchen.saas.park.api.dto.repair.SaasMatterRepairDto;
import com.yuchen.saas.park.api.util.SaasParkFeignFallbackUtils;
import feign.hystrix.FallbackFactory;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.stereotype.Component;

@Component
public class MatterRepairFeignServiceFallback implements FallbackFactory<MatterRepairFeignService> {
    @Override
    public MatterRepairFeignService create(Throwable throwable) {
        return new MatterRepairFeignService(){
            @Override
            public R<Boolean> add(SaasMatterRepairDto matterRepairDto) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }
        };
    }
}
