package com.jeeplus.flowable.factory;

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

import java.util.List;

/**
 * @author 王强
 * @version 1.0
 * @date 2023-09-21 9:22
 */
@Slf4j
@Component
public class HumanApiFallBackFactory implements FallbackFactory<IHumanApi> {

    @Override
    public IHumanApi create(Throwable cause) {
        log.error ( "人力资源服务调用失败:{}", cause.getMessage ( ) );
        return new IHumanApi() {


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

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

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

            @Override
            public void insertIntoEnrollmentRegistrationInfo(String value) {

            }

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

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

            @Override
            public void updatePracticeStatus(String id) {

            }

            @Override
            public void syncDingTalkInfo() {

            }

            @Override
            public void dingConfirmResign(String id,String mobilePhone) {

            }

            @Override
            public String findIdCardByUserId(String userId) {
                return null;
            }
        };
    }
}
