diff --git a/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/Receiver.java b/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/Receiver.java index 27d5832d..ee654a11 100644 --- a/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/Receiver.java +++ b/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/Receiver.java @@ -14,18 +14,20 @@ import com.foxinmy.weixin4j.pay.type.profitsharing.RelationType; */ public class Receiver { - public Receiver(ReceiverType type, String account) { - this.type = type; - this.account = account; - this.relationType = null; - } - public Receiver(ReceiverType type, String account, RelationType relationType) { this.type = type; this.account = account; this.relationType = relationType; } + public Receiver(ReceiverType type, String account, String name, RelationType relationType, String customRelation) { + this.type = type; + this.account = account; + this.name = name; + this.relationType = relationType; + this.customRelation = customRelation; + } + /** * 分账接收方类型 */ diff --git a/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/ReceiverProfit.java b/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/ReceiverProfit.java index 75a18f94..52b301cd 100644 --- a/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/ReceiverProfit.java +++ b/weixin4j-pay/src/main/java/com/foxinmy/weixin4j/pay/profitsharing/ReceiverProfit.java @@ -14,7 +14,7 @@ public class ReceiverProfit extends Receiver { private String description; public ReceiverProfit(ReceiverType type, String account, int amount, String description){ - super(type, account); + super(type, account, null); this.amount = amount; this.description = description; } diff --git a/weixin4j-pay/src/test/java/com/foxinmy/weixin4j/pay/test/TestProfitSharingApi.java b/weixin4j-pay/src/test/java/com/foxinmy/weixin4j/pay/test/TestProfitSharingApi.java index 635af78c..b435ddf7 100644 --- a/weixin4j-pay/src/test/java/com/foxinmy/weixin4j/pay/test/TestProfitSharingApi.java +++ b/weixin4j-pay/src/test/java/com/foxinmy/weixin4j/pay/test/TestProfitSharingApi.java @@ -39,7 +39,7 @@ public class TestProfitSharingApi { */ //@Test public void testRemoveReceiver() throws WeixinException { - Receiver receiver = new Receiver(ReceiverType.PERSONAL_OPENID, OPENID); + Receiver receiver = new Receiver(ReceiverType.PERSONAL_OPENID, OPENID, null); WeixinPayAccount account = new WeixinPayAccount(APPID, PAY_SIGN_KEY, MCHID); WeixinPayProxy proxy = new WeixinPayProxy(account); ReceiverResult result = proxy.removeProfitSharingReceiver(receiver);