View Javadoc
1   package com.foxinmy.weixin4j.pay.profitsharing;
2   
3   import com.alibaba.fastjson.JSON;
4   import com.alibaba.fastjson.annotation.JSONField;
5   import com.foxinmy.weixin4j.pay.payment.mch.MerchantResult;
6   
7   import javax.xml.bind.annotation.XmlElement;
8   import java.util.List;
9   
10  /**
11   * 单次分帐的请求内容
12   *
13   * @author kit(kit.li@qq.com)
14   * @date 2020年5月25日
15   * @since weixin4j-pay 1.1.0
16   */
17  public class ProfitSharingRequest extends MerchantResult {
18      /**
19       * 只支持HMAC-SHA256
20       */
21      @XmlElement(name = "sign_type")
22      @JSONField(name = "sign_type")
23      private final String signType = "HMAC-SHA256";
24      /**
25       * 微信支付订单号
26       */
27      @XmlElement(name = "transaction_id")
28      @JSONField(name = "transaction_id")
29      private String transactionId;
30      /**
31       * 商户订单号
32       */
33      @XmlElement(name = "out_order_no")
34      @JSONField(name = "out_order_no")
35      private String outOrderNo;
36      /**
37       * 分账接收方列表,不超过50个
38       */
39      private String receivers;
40      /**
41       * 分账完结描述
42       */
43      private String description;
44  
45      public ProfitSharingRequest(String transactionId, String outOrderNo, List<ReceiverProfit> receivers){
46          this.transactionId = transactionId;
47          this.outOrderNo = outOrderNo;
48          this.receivers = receivers!=null && receivers.size()>0 ? JSON.toJSONString(receivers) : null;
49      }
50  
51      public String getTransactionId() {
52          return transactionId;
53      }
54  
55      public void setTransactionId(String transactionId) {
56          this.transactionId = transactionId;
57      }
58  
59      public String getOutOrderNo() {
60          return outOrderNo;
61      }
62  
63      public void setOutOrderNo(String outOrderNo) {
64          this.outOrderNo = outOrderNo;
65      }
66  
67      public String getReceivers() {
68          return receivers;
69      }
70  
71      public void setReceivers(String receivers) {
72          this.receivers = receivers;
73      }
74  
75      public String getDescription() {
76          return description;
77      }
78  
79      public void setDescription(String description) {
80          this.description = description;
81      }
82  
83      @Override
84      public String getSignType() {
85          return signType;
86      }
87  }