package com.dhcc.finance.main.client;

import java.util.Map;

import org.springframework.stereotype.Component;

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.model.CountInstestFeeModel;
import com.dhcc.finance.main.model.MoneyOfInstetstOrFee;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class BatchTaskMonitorHystrixFallback implements BatchTaskMonitorFeignClient{

	@Override
	public RestfulResponse<Object, CurrencyMeta> updateBatchTaskMonitorState(Map<String, Object> responseMap) {
		didNotGetResponse();
		Shift.fatalThrow(SysStatusCode.SERVER_UNKNOWN_ERROR);
		return null;
	}
	private void didNotGetResponse() {
	    log.error("service '{}' has become unreachable", BatchTaskMonitorFeignClient.SERVICE_ID);
	}
    @Override
    public RestfulResponse<MoneyOfInstetstOrFee, CurrencyMeta>  countInstestFee(CountInstestFeeModel countInstestFeeModel) {
        // TODO Auto-generated method stub
        didNotGetResponse();
        Shift.fatalThrow(SysStatusCode.SERVER_UNKNOWN_ERROR);
        return null;
    }

}
