package com.yida.data.system.fallback;

import com.yida.data.common.core.annotation.Fallback;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.system.EduDeptPayType;
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
import com.yida.data.system.feign.RemotePayTypeService;
import com.yida.data.system.feign.RemoteQywxService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * RemoteQywxService fallback处理类
 *
 * @author ZYJ
 * @date 2023/8/26
 */
@Slf4j
@Fallback
public class RemoteQywxServiceFallback implements FallbackFactory<RemoteQywxService> {

    @Override
    public RemoteQywxService create(Throwable throwable) {
        log.error("RemoteQywxService fallback reason:{}", throwable.getMessage());

        return new RemoteQywxService() {
            @Override
            public ResultBean<EduQywxServiceProviderSchool> getCorpByOriginalData(String providerCorpId, String deptOriginalCorpId) {
                return null;
            }

            @Override
            public ResultBean<EduQywxServiceProviderSchool> getCorpByEncryptionData(String providerCorpId, String deptEncryptionCorpId) {
                return null;
            }
        };
    }
}
