package com.jeeplus.flowable.factory;

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

import java.util.List;

/**
 * 财务服务降级处理
 * @author: 王强
 * @create: 2023-07-26 17:03
 **/
@Slf4j
@Component
public class AssessApiFallbackFactory implements FallbackFactory<IAssessApi> {

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

            @Override
            public void updateArchiveStatus(String id, String archiveStatus, String overArchiveStatus) {

            }

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

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

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

            @Override
            public void insertReportNo(String value) {

            }

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

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

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

            @Override
            public List<String> getProjectData(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  getUserBySignatureScribe(String name,String userId) {
                return null;
            }

            @Override
            public String getReimbursementCreateUserIdByProcessInstanceId(String id) {
                return "";
            }
        };
    }
}
