package cn.hmsoft.pay.impl.weixin.entity;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import cn.hmsoft.helper.RandomHelper;
import cn.hmsoft.pay.data.model.PayMerchantChannel;

/***********************************
 * 生成订单后向微信回复的实体类
 * 
 * @author: 张小庆
 * @date: 2016年9月16日 下午7:51:53
 * @version: 2.0.0
 * @email: revisit@126.com
 * @Company: www.hmsoft.cn
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class GenerateOrderResultEntity {
	public GenerateOrderResultEntity(){
		
	}
	public GenerateOrderResultEntity(PayMerchantChannel mc) {
		this.appid = mc.getBank_merchant_id();
		this.mch_id = mc.getBank_merchant_name();
		this.nonce_str = RandomHelper.getRandomValue(32);
	}

	private String return_code = "SUCCESS";
	@XmlJavaTypeAdapter(value = CDATAdapter.class)
	private String return_msg;
	private String appid;
	private String mch_id;
	private String nonce_str;
	private String prepay_id;
	private String result_code = "SUCCESS";
	@XmlJavaTypeAdapter(value = CDATAdapter.class)
	private String err_code_des = "";
	private String sign = "";

	public String getReturn_code() {
		return return_code;
	}

	public void setReturn_code(String return_code) {
		this.return_code = return_code;
	}

	public String getReturn_msg() {
		return return_msg;
	}

	public void setReturn_msg(String return_msg) {
		this.return_msg = return_msg;
	}

	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	public String getMch_id() {
		return mch_id;
	}

	public void setMch_id(String mch_id) {
		this.mch_id = mch_id;
	}

	public String getNonce_str() {
		return nonce_str;
	}

	public void setNonce_str(String nonce_str) {
		this.nonce_str = nonce_str;
	}

	public String getPrepay_id() {
		return prepay_id;
	}

	public void setPrepay_id(String prepay_id) {
		this.prepay_id = prepay_id;
	}

	public String getResult_code() {
		return result_code;
	}

	public void setResult_code(String result_code) {
		this.result_code = result_code;
	}

	public String getErr_code_des() {
		return err_code_des;
	}

	public void setErr_code_des(String err_code_des) {
		this.err_code_des = err_code_des;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

}
