package com.bizzan.bitrade.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bizzan.bitrade.entity.ContractOrderEntrust;

@Service
public class WalletFactory {
	@Autowired
	private FollowWalletService followWalletService;
	@Autowired
	private SpecialFollowWalletService specialFollowWalletService;
	@Autowired
	private UserPurseService userPurseService;
	@Autowired
    private MemberContractPositionService memberContractPositionService;
	@Autowired
    private MemberService memberService;

	public WalletService getWalletService(ContractOrderEntrust order) {
		if(order.getFollowId() == null)
			return userPurseService;
		else {
			//boolean specialTrader = order.getIsSpecial()!=null && order.getIsSpecial()==1;
			//if(specialTrader)
			//	return specialFollowWalletService;
			//else
			return followWalletService;
		}
	}
}
