View Javadoc
1   package com.foxinmy.weixin4j.pay.profitsharing;
2   
3   import com.alibaba.fastjson.annotation.JSONField;
4   import com.foxinmy.weixin4j.pay.payment.mch.MerchantResult;
5   import com.foxinmy.weixin4j.pay.type.profitsharing.ReturnAccountType;
6   
7   import javax.xml.bind.annotation.XmlElement;
8   
9   /**
10   * 分帐回退API请求内容
11   *
12   * @author kit (kit.li@qq.com)
13   * @date 2020年05月25日
14   * @since weixin4j-pay 1.1.0
15   */
16  public class ProfitSharingReturnRequest extends MerchantResult {
17      /**
18       * 只支持HMAC-SHA256
19       */
20      @XmlElement(name = "sign_type")
21      @JSONField(name = "sign_type")
22      private final String signType = "HMAC-SHA256";
23      /**
24       * 微信分帐单号
25       * 原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。微信分账单号与商户分账单号二选一填写
26       */
27      private String orderId;
28      /**
29       * 商户订单号
30       * 原发起分账请求时使用的商户系统内部的分账单号。微信分账单号与商户分账单号二选一填写
31       */
32      @XmlElement(name = "out_trade_no")
33      @JSONField(name = "out_trade_no")
34      private String outOrderNo;
35      /**
36       * 商户回退单号
37       */
38      @XmlElement(name = "out_return_no")
39      @JSONField(name = "out_return_no")
40      private String outReturnNo;
41      /**
42       * 回退方类型
43       */
44      @XmlElement(name = "return_account_type")
45      @JSONField(name = "return_account_type")
46      private ReturnAccountType returnAccountType = ReturnAccountType.MERCHANT_ID;
47      /**
48       * 回退方账号
49       * 当回退方类型为商户ID时,填写商户ID
50       */
51      @XmlElement(name = "return_account")
52      @JSONField(name = "return_account")
53      private String returnAccount;
54      /**
55       * 回退金额
56       */
57      @XmlElement(name = "return_amount")
58      @JSONField(name = "return_amount")
59      private int returnAmount;
60      /**
61       * 回退描述
62       */
63      private String description;
64  
65      /**
66       * 用于回退查询的参数构造方法
67       *
68       * @param orderId
69       *          微信分帐单号
70       * @param outOrderNo
71       *          商户分帐单号
72       * @param outReturnNo
73       *          商户回退单号
74       */
75      public ProfitSharingReturnRequest(String orderId, String outOrderNo, String outReturnNo) {
76          this.orderId = orderId;
77          this.outOrderNo = outOrderNo;
78          this.outReturnNo = outReturnNo;
79      }
80  
81      /**
82       * 用于回退请求的参数构造方法
83       *
84       * @param orderId
85       *          微信分帐单号
86       * @param outOrderNo
87       *          商户分帐单号
88       * @param outReturnNo
89       *          商户回退单号
90       * @param returnAccountType
91       *          回退方类型
92       * @param returnAccount
93       *          回退方帐号
94       * @param description
95       *          回退描述
96       */
97      public ProfitSharingReturnRequest(String orderId, String outOrderNo, String outReturnNo,
98                                        ReturnAccountType returnAccountType, String returnAccount,
99                                        int returnAmount, String description) {
100         this.orderId = orderId;
101         this.outOrderNo = outOrderNo;
102         this.outReturnNo = outReturnNo;
103         this.returnAccountType = returnAccountType;
104         this.returnAccount = returnAccount;
105         this.returnAmount = returnAmount;
106         this.description = description;
107     }
108 
109     @Override
110     public String getSignType() {
111         return signType;
112     }
113 
114     public String getOrderId() {
115         return orderId;
116     }
117 
118     public void setOrderId(String orderId) {
119         this.orderId = orderId;
120     }
121 
122     public String getOutOrderNo() {
123         return outOrderNo;
124     }
125 
126     public void setOutOrderNo(String outOrderNo) {
127         this.outOrderNo = outOrderNo;
128     }
129 
130     public String getOutReturnNo() {
131         return outReturnNo;
132     }
133 
134     public void setOutReturnNo(String outReturnNo) {
135         this.outReturnNo = outReturnNo;
136     }
137 
138     public ReturnAccountType getReturnAccountType() {
139         return returnAccountType;
140     }
141 
142     public void setReturnAccountType(ReturnAccountType returnAccountType) {
143         this.returnAccountType = returnAccountType;
144     }
145 
146     public String getReturnAccount() {
147         return returnAccount;
148     }
149 
150     public void setReturnAccount(String returnAccount) {
151         this.returnAccount = returnAccount;
152     }
153 
154     public int getReturnAmount() {
155         return returnAmount;
156     }
157 
158     public void setReturnAmount(int returnAmount) {
159         this.returnAmount = returnAmount;
160     }
161 
162     public String getDescription() {
163         return description;
164     }
165 
166     public void setDescription(String description) {
167         this.description = description;
168     }
169 }