package com.sptg.estate.api.feigns.fallback;

        import com.sptg.common.core.beans.ResultBean;
        import com.sptg.common.core.beans.ResultEnum;
        import com.sptg.estate.api.entity.MemberLoginStatus;
        import com.sptg.estate.api.feigns.MemberLoginStatusFeign;
        import feign.hystrix.FallbackFactory;
        import lombok.extern.slf4j.Slf4j;
        import org.springframework.stereotype.Component;

/**
 * title: MemberFeignFallbackFactory
 * package: com.sptg.estate.api.feigns.fallback
 * description: 会员 服务接口容错处理
 *
 *
 *
 */
@Component
@Slf4j
public class MemberLoginFeignFallbackFactory implements FallbackFactory<MemberLoginStatusFeign> {
    @Override
    public MemberLoginStatusFeign create(Throwable cause) {
        return new MemberLoginStatusFeign() {
            @Override
            public MemberLoginStatus checkMemberLoginStatus(MemberLoginStatus memberLoginStatus) {
                log.error(ResultEnum.ERROR.getCode(),cause);
                return null;
            }

            @Override
            public Boolean addMemberLoginStatus(MemberLoginStatus memberLoginStatus) {
                return null;
            }

            @Override
            public Boolean updateMemberLoginStatus(MemberLoginStatus memberLoginStatus) {
                return null;
            }


        };
    }
}
