package cn.pluss.platform.leshua;

import cn.pluss.platform.entity.MerchantBankCard;

/**
 * @author yuchen
 *
 * @Description 乐刷商户信息修改dto
 */
public class MerchantUpdateDTO {

	private String merchantId;
	
	private String userId;
	
	
	private String branchProvince;
	
	private String branchCity;

	/**
	 * 商户基本信息
	 */
	private BaseInfo baseInfo;

	/**
	 * 法人信息，个人类型填联系人信息
	 */
	private LegalPerson legalPerson;

	/**
	 * 联系人信息
	 */
	private ContactInfo contactInfo;

	/**
	 * 店铺地址信息
	 */
	private AddressInfo addressInfo;

	/**
	 * 营业资质信息
	 */
	private LicenseInfo licenseInfo;

	/**
	 * 结算信息
	 */
	private AccountInfo accountInfo;

	/**
	 * 门店信息
	 */
	private ShopInfo shopInfo;

	public String getMerchantId() {
		return merchantId;
	}
	
	public String getBranchProvince() {
		return branchProvince;
	}


	public void setBranchProvince(String branchProvince) {
		this.branchProvince = branchProvince;
	}


	public String getBranchCity() {
		return branchCity;
	}


	public void setBranchCity(String branchCity) {
		this.branchCity = branchCity;
	}


	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public BaseInfo getBaseInfo() {
		return baseInfo;
	}

	public void setBaseInfo(BaseInfo baseInfo) {
		this.baseInfo = baseInfo;
	}

	public LegalPerson getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(LegalPerson legalPerson) {
		this.legalPerson = legalPerson;
	}

	public ContactInfo getContactInfo() {
		return contactInfo;
	}

	public void setContactInfo(ContactInfo contactInfo) {
		this.contactInfo = contactInfo;
	}

	public AddressInfo getAddressInfo() {
		return addressInfo;
	}

	public void setAddressInfo(AddressInfo addressInfo) {
		this.addressInfo = addressInfo;
	}

	public LicenseInfo getLicenseInfo() {
		return licenseInfo;
	}

	public void setLicenseInfo(LicenseInfo licenseInfo) {
		this.licenseInfo = licenseInfo;
	}

	public AccountInfo getAccountInfo() {
		return accountInfo;
	}

	public void setAccountInfo(AccountInfo accountInfo) {
		this.accountInfo = accountInfo;
	}

	public ShopInfo getShopInfo() {
		return shopInfo;
	}

	public void setShopInfo(ShopInfo shopInfo) {
		this.shopInfo = shopInfo;
	}

	public MerchantBankCard convert(MerchantUpdateDTO merchantUpdateDTO) {
		MerchantBankCard merchantBankCard=new MerchantBankCard();
		AccountInfo accountInfo = merchantUpdateDTO.getAccountInfo();
		String bankCardFrontPic = accountInfo.getBankCardFrontPic();
		String bankCardNo = accountInfo.getBankCardNo();
		String branch = accountInfo.getBranch();
		String holder = accountInfo.getHolder();
		String idCardNo = accountInfo.getIdCardNo();
		String unionpay = accountInfo.getUnionpay();
		merchantBankCard.setBankCardNo(bankCardNo);
		merchantBankCard.setBankCertName(holder);
		merchantBankCard.setBranchName(branch);
		merchantBankCard.setBankCardFrontPic(bankCardFrontPic);
		merchantBankCard.setCertNo(idCardNo);
		merchantBankCard.setContactLine(unionpay);
		merchantBankCard.setBranchProvince(merchantUpdateDTO.getBranchProvince());
		merchantBankCard.setBranchCity(merchantUpdateDTO.getBranchCity());
		return merchantBankCard;
	}

}
