This commit is contained in:
Kit 2020-05-27 16:10:35 +08:00
parent 61b905d543
commit 9bb9918421
4 changed files with 27 additions and 6 deletions

View File

@ -1008,9 +1008,10 @@ public class WeixinPayProxy {
*/
public ProfitSharingReturnResult profitSharingReturn(ProfitId id, String outReturnNo,
ReturnAccountType returnAccountType, String returnAccount,
String description)
int returnAmount, String description)
throws WeixinException{
return profitSharingApi.profitSharingReturn(id, outReturnNo, returnAccountType, returnAccount, description);
return profitSharingApi.profitSharingReturn(id, outReturnNo, returnAccountType, returnAccount, returnAmount,
description);
}
/**

View File

@ -156,6 +156,8 @@ public class ProfitSharingApi extends MchApi {
* 回退方类型
* @param returnAccount
* 回退方账号
* @param returnAmount
* 回退金额
* @param description
* 回退描述
* @return
@ -165,14 +167,14 @@ public class ProfitSharingApi extends MchApi {
*/
public ProfitSharingReturnResult profitSharingReturn(ProfitId id, String outReturnNo,
ReturnAccountType returnAccountType, String returnAccount,
String description) throws WeixinException{
int returnAmount, String description) throws WeixinException{
ProfitSharingReturnRequest request;
if(id.getIdType()== ProfitIdType.ORDER_ID){
request = new ProfitSharingReturnRequest(id.getId(), null, outReturnNo, returnAccountType,
returnAccount, description);
returnAccount, returnAmount, description);
}else{
request = new ProfitSharingReturnRequest(null, id.getId(), outReturnNo, returnAccountType,
returnAccount, description);
returnAccount, returnAmount, description);
}
super.declareMerchant(request);
String url = getRequestUri("profit_sharing_return_uri");

View File

@ -51,6 +51,12 @@ public class ProfitSharingReturnRequest extends MerchantResult {
@XmlElement(name = "return_account")
@JSONField(name = "return_account")
private String returnAccount;
/**
* 回退金额
*/
@XmlElement(name = "return_amount")
@JSONField(name = "return_amount")
private int returnAmount;
/**
* 回退描述
*/
@ -89,12 +95,14 @@ public class ProfitSharingReturnRequest extends MerchantResult {
* 回退描述
*/
public ProfitSharingReturnRequest(String orderId, String outOrderNo, String outReturnNo,
ReturnAccountType returnAccountType, String returnAccount, String description) {
ReturnAccountType returnAccountType, String returnAccount,
int returnAmount, String description) {
this.orderId = orderId;
this.outOrderNo = outOrderNo;
this.outReturnNo = outReturnNo;
this.returnAccountType = returnAccountType;
this.returnAccount = returnAccount;
this.returnAmount = returnAmount;
this.description = description;
}
@ -143,6 +151,14 @@ public class ProfitSharingReturnRequest extends MerchantResult {
this.returnAccount = returnAccount;
}
public int getReturnAmount() {
return returnAmount;
}
public void setReturnAmount(int returnAmount) {
this.returnAmount = returnAmount;
}
public String getDescription() {
return description;
}

View File

@ -14,6 +14,8 @@ import com.foxinmy.weixin4j.pay.type.profitsharing.RelationType;
*/
public class Receiver {
public Receiver(){}
public Receiver(ReceiverType type, String account, RelationType relationType) {
this.type = type;
this.account = account;