package cn.pluss.platform.wap;

import cn.pluss.platform.entity.MerchantOrder;
import cn.pluss.platform.util.StringUtil;
import lombok.Data;

/**
 * @author yuchen
 * 
 * @Description 
 * (wap端支付宝支付)
 */
@Data
public class MerchantAliPayDTO {
	
	/**
	 * 支付宝 商户token(在创建支付宝订单的时候需要)
	 */
	private String appAuthToken;
	
	private String userAppId;
	
	/**
	 * 用户的支付宝userid
	 */
	private String userid;
	
	/**
	 * 支付金额
	 */
	private String comsumeMoney;
	
	/**
	 * 商家编码
	 */
	private String merchantCode;
	
	private String storeId;
	
	private String orderNumber="Z"+StringUtil.getBillno();
	
	/**
	 * 用户头像
	 */
	private String userImg;
	
	/**
	 * 用户昵称
	 */
	private String nickName;
	
	private String remark;

	/**
	 * 支付宝支付订单流水号
	 */
	private String aliPayTransNo;

	public MerchantOrder getMerchantOrder() {
		MerchantOrder merchantOrder=new MerchantOrder();
		merchantOrder.setConsumeFee(this.comsumeMoney==""?0.0d:Double.valueOf(this.comsumeMoney));
		merchantOrder.setMerchantCode(this.merchantCode);
		merchantOrder.setStoreId(this.storeId);
		merchantOrder.setPayTypeCode("aliPay");
		merchantOrder.setPayTypeName("支付宝");
		merchantOrder.setStatus("5");
		merchantOrder.setOrderType("2");
		merchantOrder.setUserImg(userImg);
		merchantOrder.setNickName(nickName);
		merchantOrder.setOrderNumber(this.orderNumber);
		merchantOrder.setThirdTransNo(this.aliPayTransNo);
		return merchantOrder;
	}
	
	

}

