package com.dhcc.finance.main.client;

import com.dhcc.common.Shift;
import com.dhcc.common.constant.SysStatusCode;
import com.dhcc.common.model.CurrencyMeta;
import com.dhcc.common.model.response.RestfulResponse;
import com.dhcc.finance.main.domain.SysDictInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Slf4j
@Component
public class VoucherTaskMonitorHystrixFallback implements VoucherTaskMonitorFeignClient{

	private void didNotGetResponse() {
	    log.error("service '{}' has become unreachable", VoucherTaskMonitorFeignClient.SERVICE_ID);
	}

	@Override
	public RestfulResponse<List<SysDictInfo>, CurrencyMeta> searchDictInfoByDictName(List<String> list) {
		didNotGetResponse();
		Shift.fatalThrow(SysStatusCode.SERVER_UNKNOWN_ERROR);
		return null;
	}

	@Override
	public RestfulResponse<List<SysDictInfo>, CurrencyMeta> selectDictInfoByDictField(List<String> list) {
		didNotGetResponse();
		Shift.fatalThrow(SysStatusCode.SERVER_UNKNOWN_ERROR);
		return null;
	}
}
