package com.yida.data.school.fallback.index;

import com.yida.data.common.core.annotation.Fallback;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.school.EduDeptHomeApp;
import com.yida.data.school.dto.leave.ListStudentRequestDetailDTO;
import com.yida.data.school.dto.userLeave.ListUserRequestDTO;
import com.yida.data.school.feign.index.RemoteDeptHomeIndexService;
import com.yida.data.school.feign.leave.RemoteLeaveRequestService;
import com.yida.data.school.vo.userLeave.EduLeaveRequestUserVO;
import feign.hystrix.FallbackFactory;
import java.util.List;
import lombok.extern.slf4j.Slf4j;

/**
 * RemoteDeptHomeIndexService fallback处理类
 *
 * @author ZYJ
 * @date 2022/8/26
 */
@Slf4j
@Fallback
public class RemoteDeptHomeInfoServiceFallback implements FallbackFactory<RemoteDeptHomeIndexService> {

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

        return new RemoteDeptHomeIndexService() {

            @Override
            public ResultBean<List<EduDeptHomeApp>> getDeptAppList(Long schoolId) {
                return null;
            }
        };
    }
}
