This commit is contained in:
Kit 2020-05-27 11:10:56 +08:00
parent 78a53b8016
commit 61b905d543
3 changed files with 10 additions and 8 deletions

View File

@ -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;
}
/**
* 分账接收方类型
*/

View File

@ -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;
}

View File

@ -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);