package com.jeeplus.flowable.factory;

import com.jeeplus.flowable.feign.IAssessApi;
import com.jeeplus.flowable.feign.IFinanceApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 会计服务降级处理
 * @author: 徐滕
 * @create: 2023-10-16 16:21
 **/
@Slf4j
@Component
public class FinanceApiFallbackFactory implements FallbackFactory<IFinanceApi> {

    @Override
    public IFinanceApi create(Throwable cause) {
        log.error ( "会计服务调用失败:{}", cause.getMessage ( ) );
        return new IFinanceApi() {

            @Override
            public String getNotFiledYetList() {
                return null;
            }

            @Override
            public List<String> getCwProjectData(String id) {
                return null;
            }

            @Override
            public List<String> getMembersId(String id) {
                return null;
            }

            @Override
            public void insertMembers(String projectId, String membersId,String userId) {

            }

            @Override
            public String getPlanDetails() {
                return null;
            }

            @Override
            public String updateQualityOverdueStatus() {
                return null;
            }

            @Override
            public String updateOnlineArchiveStatus() {
                return null;
            }

            @Override
            public String updatePaperArchiveStatus() {
                return null;
            }

        };
    }
}
