🎨 资金对账单下载接口v2和v3所需资金账户类型枚举值不一致,分开存放

This commit is contained in:
Binary Wang 2023-11-25 22:25:30 +08:00
parent 786a78ea26
commit beec6031af
5 changed files with 44 additions and 23 deletions

View File

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

View File

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

View File

@ -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";
}
/**
* 签名类型.
*/

View File

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

View File

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