package com.pj.api.consts;

import com.pj.api.client.admin.AdminInterface;
import com.pj.api.client.async_server.AsyncServerInterface;
import com.pj.api.client.level_one_server.LevelOneServerInterface;
import com.pj.api.client.level_two_server.LevelTwoServerInterface;
import com.pj.api.client.payment_server.PaymentServerInterface;
import com.pj.api.client.transport.TransportInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.pj.api.client.cfg.SpCfgInterface;

/**
 * Feign bean工厂类
 * @author kong
 *
 */
@Component
public class FeignFactory {

	/**
	 *  系统配置 通信接口
	 */
	public static SpCfgInterface spCfgInterface;
	@Autowired
	public void setSpCfgInterface(SpCfgInterface spCfgInterface) {
		FeignFactory.spCfgInterface = spCfgInterface;
	}

	/**
	 * app用户  通信接口
	 */
	public static AdminInterface adminInterface;
	@Autowired
	public void setAdminInterface(AdminInterface adminInterface){
		FeignFactory.adminInterface = adminInterface;
	}

	/**
	 * 物流  通信接口
	 */
	public static TransportInterface transportInterface;
	@Autowired
	private void setTransportInterface(TransportInterface transportInterface){FeignFactory.transportInterface = transportInterface;}

	/**
	 * 一级市场 通信接口
	 */
	public static LevelOneServerInterface levelOneServerInterface;
	@Autowired
	private void setLevelOneServerInterface(LevelOneServerInterface levelOneServerInterface){FeignFactory.levelOneServerInterface = levelOneServerInterface;}

	/**
	 * 二级市场 通信接口
	 */
	public static LevelTwoServerInterface levelTwoServerInterface;
	@Autowired
	public void setLevelTwoServerInterface(LevelTwoServerInterface levelTwoServerInterface){
		FeignFactory.levelTwoServerInterface = levelTwoServerInterface;
	}

	/**
	 * 异步通信接口
	 */
	public static AsyncServerInterface asyncServerInterface;
	@Autowired
	public void setAsyncServerInterface(AsyncServerInterface asyncServerInterface){
		FeignFactory.asyncServerInterface = asyncServerInterface;
	}

	/**
	 * 银行扣款通信接口
	 */
	public static PaymentServerInterface paymentServerInterface;
	@Autowired
	public void setPaymentServerInterface(PaymentServerInterface paymentServerInterface){
		FeignFactory.paymentServerInterface = paymentServerInterface;
	}
}
