mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 资金对账单下载接口v2和v3所需资金账户类型枚举值不一致,分开存放
This commit is contained in:
parent
786a78ea26
commit
beec6031af
@ -16,6 +16,25 @@ import java.io.Serializable;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class WxPayApplyFundFlowBillV3Request implements Serializable {
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
public static class AccountType {
|
||||
/**
|
||||
* BASIC:基本账户
|
||||
*/
|
||||
public static final String BASIC = "BASIC";
|
||||
/**
|
||||
* OPERATION:运营账户
|
||||
*/
|
||||
public static final String OPERATION = "OPERATION";
|
||||
/**
|
||||
* FEES:手续费账户
|
||||
*/
|
||||
public static final String FEES = "FEES";
|
||||
}
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.github.binarywang.wxpay.bean.request;
|
||||
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants.AccountType;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.*;
|
||||
@ -26,6 +25,27 @@ import java.util.Map;
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
public class WxPayDownloadFundFlowRequest extends BaseWxPayRequest {
|
||||
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
public static class AccountType {
|
||||
/**
|
||||
* BASIC:基本账户
|
||||
*/
|
||||
public static final String BASIC = "Basic";
|
||||
/**
|
||||
* OPERATION:运营账户
|
||||
*/
|
||||
public static final String OPERATION = "Operation";
|
||||
/**
|
||||
* FEES:手续费账户
|
||||
*/
|
||||
public static final String FEES = "Fees";
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -8352717499328292952L;
|
||||
|
||||
private static final String[] ACCOUNT_TYPES = new String[]{AccountType.BASIC, AccountType.OPERATION, AccountType.FEES};
|
||||
private static final String SIGN_TYPE_HMAC_SHA256 = "HMAC-SHA256";
|
||||
private static final String TAR_TYPE_GZIP = "GZIP";
|
||||
@ -83,8 +103,9 @@ public class WxPayDownloadFundFlowRequest extends BaseWxPayRequest {
|
||||
throw new WxPayException(String.format("account_type必须为%s其中之一,实际值:%s",
|
||||
Arrays.toString(ACCOUNT_TYPES), this.getAccountType()));
|
||||
}
|
||||
/**
|
||||
* 目前仅支持HMAC-SHA256
|
||||
|
||||
/*
|
||||
目前仅支持HMAC-SHA256
|
||||
*/
|
||||
this.setSignType(SIGN_TYPE_HMAC_SHA256);
|
||||
}
|
||||
|
@ -170,24 +170,6 @@ public class WxPayConstants {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
public static class AccountType {
|
||||
/**
|
||||
* BASIC:基本账户
|
||||
*/
|
||||
public static final String BASIC = "BASIC";
|
||||
/**
|
||||
* OPERATION:运营账户
|
||||
*/
|
||||
public static final String OPERATION = "OPERATION";
|
||||
/**
|
||||
* FEES:手续费账户
|
||||
*/
|
||||
public static final String FEES = "FEES";
|
||||
}
|
||||
|
||||
/**
|
||||
* 签名类型.
|
||||
*/
|
||||
|
@ -971,7 +971,6 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
|
||||
|
||||
@Override
|
||||
public WxPayFundFlowResult downloadFundFlow(String billDate, String accountType, String tarType) throws WxPayException {
|
||||
|
||||
WxPayDownloadFundFlowRequest request = new WxPayDownloadFundFlowRequest();
|
||||
request.setBillDate(billDate);
|
||||
request.setAccountType(accountType);
|
||||
|
@ -11,7 +11,7 @@ import com.github.binarywang.wxpay.bean.result.*;
|
||||
import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum;
|
||||
import com.github.binarywang.wxpay.config.WxPayConfig;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants.AccountType;
|
||||
import com.github.binarywang.wxpay.bean.request.WxPayDownloadFundFlowRequest.AccountType;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants.BillType;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants.SignType;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants.TradeType;
|
||||
|
Loading…
Reference in New Issue
Block a user