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

import com.yuchen.saas.park.api.dto.property.*;
import com.yuchen.saas.park.api.util.SaasParkFeignFallbackUtils;
import com.yuchen.saas.park.api.vo.property.*;
import feign.hystrix.FallbackFactory;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.stereotype.Component;

/**
 * @Author 蔡文强
 * @Date 2023/10/27 10:56
 * @Description 预约看房feign接口回调类
 */
@Component
public class PropertyAppointHouseFeignServiceFallback implements FallbackFactory<PropertyAppointHouseFeignService> {

    @Override
    public PropertyAppointHouseFeignService create(Throwable throwable) {
        return new PropertyAppointHouseFeignService() {


            @Override
            public R<Boolean> submitIntention(PropertyAppointHouseSubmitIntentionDTO submitIntentionDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> confirmIntention(PropertyAppointHouseConfirmIntentionDTO confirmIntentionDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<PropertyAppointHouseIntentionDetailVO> getIntentionDetailById(Long id) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PropertyAppointHouseIntentionPcListVO>> getPcIntentionList(PropertyAppointHouseIntentionPcListQueryDTO queryDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PropertyAppointHouseIntentionAppListVO>> getAppIntentionList(PropertyAppointHouseIntentionAppListQueryDTO queryDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> appointRegister(PropertyAppointHouseRegisterDTO registerDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> reviewRegister(PropertyAppointHouseReviewRegisterDTO reviewRegisterDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> appointCancel(PropertyAppointHouseCancelDTO cancelDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PropertyAppointHousePcListVO>> getPcAppointList(PropertyAppointHousePcListQueryDTO queryDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PropertyAppointHouseAppListVO>> getAppAppointList(PropertyAppointHouseAppListQueryDTO queryDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PropertyAppointHouseAppListVO>> getMyAppointList(PropertyAppointHouseAppListQueryDTO queryDTO) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<PropertyAppointHouseDetailVO> getAppointDetailById(Long id) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<PropertyAppointHouseMyDetailVO> getMyAppointDetailById(Long id) {
                return SaasParkFeignFallbackUtils.printLogAndReturn(throwable);
            }
        };
    }
}
