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;

/**
 * 财务服务降级处理
 * @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;
            }
        };
    }
}
