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   /**
8    * 微信支付-服务商分帐接口-分帐接收方API返回结果
9    *
10   * @author kit(kit_21cn@21cn.com)
11   * @className ProfitSharingReceiverResult
12   * @date 2020年05月20日
13   * @since weixin4j-pay 1.1.0
14   */
15  public class ReceiverResult extends MerchantResult {
16      /**
17       * 分账接收方对象,json格式字符串
18       */
19      @JSONField(serialize = false)
20      private String receiver;
21  
22      public String getReceiver() {
23          return receiver;
24      }
25  
26      public void setReceiver(String receiver) {
27          this.receiver = receiver;
28      }
29  
30      /**
31       * 返回接收方java对象
32       */
33      @JSONField(name = "receiver")
34      public Receiver getReceiverObject(){
35          try {
36              return JSON.parseObject(receiver, Receiver.class);
37          } catch (Exception e) {
38              return null;
39          }
40      }
41  }