package org.jeecg.modules.pay.entity;
 
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;


/**
 * 分账协议
 * 
 * @author libaibai
 * @version 1.0 2020年10月19日
 */
public class Profitsharing {
 
	private String mch_id; //
	private String sub_mch_id; //
	private String appid;
 
//	private String nonce_str = UUIDUtil.getUUID19();
	private String sign;
 
	private String transaction_id; // 微信订单号
 
	private String out_order_no; // 分账单号
 
	private String receivers; // 分账接收方列表
 
	public Profitsharing(String mch_id, String sub_mch_id, String appid, String transaction_id, String out_order_no, String receivers, String key) {
		this.mch_id = mch_id;
		this.sub_mch_id = sub_mch_id;
		this.appid = appid;
		this.transaction_id = transaction_id;
		this.out_order_no = out_order_no;
		this.receivers = receivers;
//		this.sign = Signature.getSignSha(toMap(), key);
	}
 
	public String getMch_id() {
		return mch_id;
	}
 
	public void setMch_id(String mch_id) {
		this.mch_id = mch_id;
	}
 
	public String getSub_mch_id() {
		return sub_mch_id;
	}
 
	public void setSub_mch_id(String sub_mch_id) {
		this.sub_mch_id = sub_mch_id;
	}
 
	public String getAppid() {
		return appid;
	}
 
	public void setAppid(String appid) {
		this.appid = appid;
	}
 
//	public String getNonce_str() {
//		return nonce_str;
//	}
//
//	public void setNonce_str(String nonce_str) {
//		this.nonce_str = nonce_str;
//	}
 
	public String getSign() {
		return sign;
	}
 
	public void setSign(String sign) {
		this.sign = sign;
	}
 
	public String getTransaction_id() {
		return transaction_id;
	}
 
	public void setTransaction_id(String transaction_id) {
		this.transaction_id = transaction_id;
	}
 
	public String getOut_order_no() {
		return out_order_no;
	}
 
	public void setOut_order_no(String out_order_no) {
		this.out_order_no = out_order_no;
	}
 
	public String getReceivers() {
		return receivers;
	}
 
	public void setReceivers(String receivers) {
		this.receivers = receivers;
	}
 
	public Map<String, Object> toMap() {
		Map<String, Object> map = new HashMap<String, Object>();
		Field[] fields = this.getClass().getDeclaredFields();
		for (Field field : fields) {
			Object obj;
			try {
				obj = field.get(this);
				if (obj != null) {
					map.put(field.getName(), obj);
				}
			} catch (IllegalArgumentException e) {
			} catch (IllegalAccessException e) {
			}
		}
		return map;
	}
}